Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #14.9K
Ranked #3K
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 14

7 Posted Topics

Member Avatar for ehsantl

Aside from a lot of poor style (e.g. you should never have "using namespace" at global level in any header file) and not showing important parts of the code (e.g. the declaration of customers), you're pretty close. I'm guessing that customers is: [CODE] Customer* customers[10]; [/CODE] because the new operator …

Member Avatar for rbv
3
311
Member Avatar for railmaster7

Try like this: [code] void ExprTree::setVariable(const string& s, double d) { vector<Variable>::iterator pos; for(pos = varList.begin(); pos!= varList.end(); ++pos) { if(pos->data == s) { //two equals for comparison *pos = Variable(s,d); // one equals for assignment return; // you're wasting time continuing to loop after you found a match } …

Member Avatar for chunalt787
0
156
Member Avatar for ayan2587

The computer doesn't store the number in decimal form. It just displays it that way. Also your input isn't being converted into the internal binary number either, unless you call a conversion function to do so. How are you getting the input (command-line, cin, fread, gets, ReadFile, text box)? You'll …

Member Avatar for ayan2587
0
347
Member Avatar for DC257209

[QUOTE=firstPerson;1005664]Disappointed to see you suggest a non-standard function. In C++ you should use sstream for conversion from string to numbers. [/QUOTE] Or just read an integer from the cin stream in the first place.

Member Avatar for mrnutty
0
150
Member Avatar for robgeek

Use a while loop instead. Also, the for loop is a lot more flexible than "count from 0 to N". The syntax is: for ( initialize ; condition ; update ) controlled_statement_or_block condition can be anything, not just i <= N. For example, looping through a string often looks like: …

Member Avatar for rbv
0
119
Member Avatar for jakesee

Your original code is using pass-by-value. The value you're passing is a pointer (really an address) but your function still gets a copy of the pointer. So data1 and data2 inside the function are separate from data1 and data2 outside. Now you're changing data1 to point somewhere new, if you …

Member Avatar for jakesee
0
328
Member Avatar for kiuhnmgrtdcv

There could be more than one copy of notepad.exe running you know. See EnumProcesses, example here: [URL="http://msdn.microsoft.com/en-us/library/ms682623(VS.85).aspx"]http://msdn.microsoft.com/en-us/library/ms682623(VS.85).aspx[/URL]

Member Avatar for rbv
0
162

The End.