Forum: C++ Jul 13th, 2009 |
| Replies: 3 Views: 261 This thread here talks about float comparisons. There's a good link available in the thread about the same.
Thread1 (http://www.daniweb.com/forums/thread73810.html) |
Forum: C++ Jul 1st, 2009 |
| Replies: 10 Views: 441 And who are 'they' ?? My opinion, C++ is way harder than Java, so don't start with wrong notions. |
Forum: C++ Jul 1st, 2009 |
| Replies: 3 Views: 378 If you are compiling them one-by-one make sure you only compile and don't go to the linking process. I think you might be doing that and while trying to create an executable its not finding main.... |
Forum: C++ Jun 29th, 2009 |
| Replies: 13 Views: 542 1->atoi signature is this:
int atoi ( const char * str );
2-> read some more threads here to find out alternatives to atoi. You should avoid using it. |
Forum: C++ Jun 26th, 2009 |
| Replies: 2 Views: 321 Before even going into your logic i have a couple of things I can tell you
1-> Read the code-tags page carefully and learn to use them correctly. it would make your code much easier to read.
2->... |
Forum: C++ Jan 29th, 2009 |
| Replies: 4 Views: 282 There's a post at the top of the forum Read This before posting (http://www.daniweb.com/forums/thread78223.html). It talks about using code tags and posting well indented and easy to read code.... |
Forum: C++ Jan 21st, 2009 |
| Replies: 9 Views: 323 I would say you can use the following algorithm
1> convert both the arrays to all upper case or all lower case
2> sort both the arrays
3> compare the contents
4> at first mismatch print 'its... |
Forum: C++ Jan 17th, 2009 |
| Replies: 26 Views: 1,107 where's the code for TestAccount.cpp? |
Forum: C++ Dec 9th, 2008 |
| Replies: 5 Views: 428 point->item->return_value();should give a segementation fault.
i saw you 'Promosion::linkup' function and nowhere you are assigning anything to the 'Applicant *item;'. it will be NULL or may be... |
Forum: C++ Dec 2nd, 2008 |
| Replies: 18 Views: 1,159 for(i = 0 ; *Src!='\0' ; Src++)
tmp[i]=*Src;
should increment 'i' also. as of now 'i' remains 0 throughout. |
Forum: C++ Oct 10th, 2008 |
| Replies: 4 Views: 516 or you could do something like ...
int* arr = new int[rows * cols];
then go on adding elements to it ... |
Forum: C++ Jul 9th, 2008 |
| Replies: 7 Views: 1,503 i think its more because of the keyword 'virtual', just try and remove that and it compiles and excutes fine. Normally the class Second wil call the ctor of class First and then class First will call... |
Forum: C++ Jul 7th, 2008 |
| Replies: 4 Views: 606 i dont think you should assign a char inside double quotes. Try
play[2] = '*'
if (play[2] == '*') |
Forum: C++ Apr 23rd, 2008 |
| Replies: 1 Views: 540 just print out the array using 2 for loops.
something like
int a[m][n];
cout << "Name" << " " << "Total" << endl;
for(int i=0;i<m;i++)
{
for(int j=0;j<n;j++) |
Forum: C++ Apr 18th, 2008 |
| Replies: 11 Views: 991 Please use 'Code Tags', i dont know how many times the mods have been telling this.
secondly just pasting too much code is not going to help anyone, sometimes it can even confuse the person. It's... |
Forum: C++ Apr 18th, 2008 |
| Replies: 11 Views: 1,500 i dont see anything wrong with the code above and when i executed this i got this output
edit: forgot to mention that the output is succesfully written to the file also. I hope you have the... |
Forum: C++ Apr 11th, 2008 |
| Replies: 5 Views: 610 From your logic you didnt need an array of integers at all. you are writing the value to the same pointer every loop. if you want to use the array do something like this.
cin>>ptr[count]
and... |
Forum: C++ Feb 8th, 2008 |
| Replies: 14 Views: 1,475 To me the usage of operator overloading to do this doesnt seem good.. you have a collect class and that has an array of movie class. simply write an addMovie function in collect class, pass on the... |
Forum: C++ Jan 31st, 2008 |
| Replies: 5 Views: 2,998 when you declare a function as const, it implies that you cannot change the state of the object inside that function. that means you cannot change the value of any member variable inside the function... |