49,757 Topics

Member Avatar for
Member Avatar for sdr001

Hello, I am having a problem when I am trying to create a new node. The problem is on line: [CODE] tnode->lc= new cttNode; [/CODE] Here is the template the problem resides in: [CODE] template <class B> int ctt<B> :: insertIfNew(const string &key, const B &index) { cttNode<B> *tnode= root; …

Member Avatar for daviddoria
0
160
Member Avatar for ziggystarman

Hi Got a webBrowser control on a form displaying ads from a server, trying to load page in the default browser when user clicks on a banner within webBrowser control, by default the control always load pages within IE Browser which is not really what one wants. This is about …

Member Avatar for ziggystarman
0
691
Member Avatar for geir88

Hi, I've got an assignment at school that I would really like help with. I'm a total newbie. [code=c]#include <iostream> using namespace std; int main() { char chr=(char)67; unsigned int offset = 1000; char * ptr=(char*)0; ptr+=offset; cout << ptr[0] << (char)43 << (char)(chr-24) << endl; } [/code] The questions …

Member Avatar for Fbody
0
108
Member Avatar for honamc

I have a major concern about this. Recenlt i am doing a sequenclick game. in 16 boxes, when start, there are randomly 16 different numbers coming up.

Member Avatar for jonsca
0
102
Member Avatar for BMPaul

Hello, im a noob with C++ at the moment and Im trying to create a BMP image from pixel data stored in a array. Everything seems to work except that when i look at the file generated in a hex editor i get an extra '00 00' in between the …

Member Avatar for gpyrounakis
0
2K
Member Avatar for Gernicha

Hey everyone!! I am having trouble printing the whole of a multidimensional char array. [CODE] #include <iostream> using namespace std; int main(){ char array [5][10] = {"---------", "| |", "| |", "---------"}; cout << array << endl; system ("pause"); return 0; } [/CODE] It just gives me random numbers and …

Member Avatar for Gernicha
0
182
Member Avatar for sheri khan

please any one give me the code of this program using nested for loop * ** *** **** ***** please see attachment for correct question

Member Avatar for csurfer
0
69
Member Avatar for tetran

Hi all, I just want to ask about setprecision because I'm a bit confused. here's the code: [CODE] #include <iostream> #include <iomanip> using namespace std; int main() { double rate = x; cout << fixed << setprecision(2) << rate; }[/CODE] where x = to following: the left side of equation …

Member Avatar for Momerath
0
77
Member Avatar for mrinal.s2008

I was a C++ trainer for 3+ years and now am a developer with a software company. Last week, i had to undergo a C++ test on [url]www.brainbench.com[/url], as a part of my company's internal assessment. I scored 3.5 in the test (I'd gone unprepared at all). Can someone please …

Member Avatar for jwenting
0
110
Member Avatar for salty11

im trying to get this function to show the numbers that are not on the list in the input file, i've written this and it doesnt work, i know theres sometihng wrong with it but im not sure what it is? or how i can fix it to make it …

Member Avatar for salty11
0
175
Member Avatar for mpike

OK! i have a problem. I'm making a game with a character you control and theres monsters that move when you do and when you run into a monster i have it so you lose 1 life. (iLife --; ) i set iLife equal to 4 at the start. if …

Member Avatar for VernonDozier
0
124
Member Avatar for massivefermion

I know the how to fill a magic square but there is a problem in the code. The algorithm is like below: 1-Put number 1 at the second column of first row. 2-Put the next number one upper row and one behind column. 3-If the cell mentioned in the last …

Member Avatar for massivefermion
0
207
Member Avatar for hous3aholik

Hi guys im trying to generate 5 random numbers that return a string so i can compare it to a file. so far i have this but i have no idea how to make it a string. Since i have to compare it to the file i mentioned earlier. This …

Member Avatar for TrustyTony
0
2K
Member Avatar for tdba.316

Hi! For the past few months I've been self-learning C++ with the book "C++ Primer Plus" by Stephen Prata. After having gotten through chapter 7, I decided to check my progress by writing a little program, Baztro. Baztro stands for Basic Astrology Tool. It asks you for birthdate(s) and will …

Member Avatar for tdba.316
0
574
Member Avatar for moey187

Hi, I'm new to programming and I'm doing a course in uni. I'm currently using "Dev-C++". I've been away on holidays and haven't been able to grasp the work we're doing now. I would really appreciate it if any of you C++ programming geniuses helped me with my work as …

Member Avatar for ntrncx
0
550
Member Avatar for jmcginny5

I have to "re-write" the program that I wrote before. Here is the prompt of what to do: Overview For this assignment, re-write program 7 so that rather than using multiple arrays to hold the player information, it uses a single array of structures. The structure that will be used …

Member Avatar for damm
0
395
Member Avatar for DaniwebOS

I'm getting a "IntelliSense no default constructor exists for class "Person" line 71." Also am getting error c2512: 'Person:' no appropriate default constructor available... There is a constructor there which confuses me on why I'm getting an error? [CODE]#include <iostream> #include <string> using namespace std; class Bio { public: Bio(); …

Member Avatar for DaniwebOS
0
21K
Member Avatar for hous3aholik

Hi! Im finishing up a lottery number generator and the only part im kinda lost in is the binary search part. I have two strings = input[], random; I have to go through each subscript and check if it matches my already random generated number. Thanks in advance to those …

Member Avatar for VernonDozier
0
192
Member Avatar for cossay

The program below crashes anytime I run it, can anyone tell what I have done wrong?. [CODE] #include <iostream> #include <cstring> using namespace std; class Human { private: char *fname; char *srname; char *phone; public: char * getFirstName(); char * getLastName(); char * getPhone(); Human(char *fn, char *sn, char *ph); …

Member Avatar for Tomi1988
0
141
Member Avatar for manofhouse

Program is suppose to convert binary to hex.. it says that i need a class/struct/union to the left of ".substr" but im pretty sure convert should be working.. [CODE]#include <iostream> #include <string> using namespace std; int main () { string convert [8]; string bin[16]= {"0000", "0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"}; string hex[16]= { "0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}; …

Member Avatar for Tomi1988
0
418
Member Avatar for NvIs

My professor gave us an assignment to Convert the following 2 numbers to binary, octal and hex. 3.567, 0.032432 which would be easy if the numbers given weren't in decimals. I'm using the % operator and that can't be used by float... I'm lost. Can someone give me an idea …

Member Avatar for NvIs
0
123
Member Avatar for dunderMiflin

I am a 22 year old college gal currently enrolled in a c++ course, and we are on the topic of recursion. I understand how it works and have completed several other exercises on the professor has listed in the book, but this one has me stumped. Is there anyone …

Member Avatar for Insensus
0
232
Member Avatar for dalk8978

Can someone help me out with this program. Programming problem – This program must meet the following criteria: 1. Character reading loop: i. Requests the user to enter a character at the keyboard 5 different times. ii. Reads in each character using getchar () within the loop. iii. Verifies that …

Member Avatar for frogboy77
0
161
Member Avatar for Awilson089

Hi, I have a program which needs to accept a date, it can only accept under 30 days, and the entry has to be over 0 My problem is that it accepts anything, it doesnt make sense because i have used the exact layout on other bits of code which …

Member Avatar for Awilson089
0
101
Member Avatar for GhostMonkey

Hey, I've got this code that scans a 3x3 section of a 9x9 array. Heres the code: [CODE]for (j=x; j<x+3; j++) { for (i=y; i<y+3; i++) { if (array[i][j] == value) { cout<< "Number already used in Section" << endl; } } }[/CODE] It works fine if you start from …

Member Avatar for GhostMonkey
0
92
Member Avatar for Labdabeta

Is there any way to implement a scope change for the template keyword? I have a templated class with almost 100 different functions and my code looks disgusting with my external declarations. Is there any way to implement a scope increase for template? EG: [CODE]template <typename Type> class TypeClass { …

Member Avatar for Fbody
0
202
Member Avatar for Khoanyneosr

I'm REALLY angry! I've been trying to get this stupid code to compile for way too long now. I've spent 30 bucks on this book and the first code it tells you compile doesn't work! Here's a link to the code... [url]http://d3dcoder.net/d3d10.htm[/url] I'm sorry that you have to download that …

Member Avatar for Khoanyneosr
0
156
Member Avatar for Climber Ty

So this is my final project for my class. The idea is to use my RationalNum class (which is complete and works fine... I just didn't attach the .cpp since it was only the driver) and use it to add, sub, & multi polynomials (RationalNum being the coefficients i.e. 1/4x^3 …

Member Avatar for Climber Ty
0
473
Member Avatar for Cece Skies

receiving this error: error C2011: 'Placement' : 'class' type redefinition please help! this is due soon.

Member Avatar for Fbody
0
31
Member Avatar for Banf

so im starting in C++ programming and im working out of a textbook. At the moment im stuck on the question asking me to determine using an input(cin) whether an input is a lowercase or uppercase letter. I am particularly confused on how to determine if an input is upper …

Member Avatar for frogboy77
0
289

The End.