Forum: C++ Mar 3rd, 2006 |
| Replies: 5 Views: 1,524 You're treating deck[i] like a pointer when it's not. |
Forum: C++ Feb 8th, 2006 |
| Replies: 4 Views: 5,783 #include <iostream>
#include <sstream>
using namespace std;
int main()
{
int a =23545;
ostringstream o;
o<<a;
cout<<o.str().size()<<endl;
return 0; |
Forum: C++ Jan 26th, 2006 |
| Replies: 13 Views: 5,533 http://www.delorie.com/djgpp/v2faq/faq22_25.html |
Forum: C++ Jan 25th, 2006 |
| Replies: 13 Views: 5,533 Also, main really should return an int. |
Forum: C++ Jan 21st, 2006 |
| Replies: 4 Views: 1,694 trade(word[i]) != '\n' || i < 5)
(don't you want && i< 5 ) |
Forum: C++ Jan 17th, 2006 |
| Replies: 5 Views: 1,223 add a 'using namespace std' at the top and see if it makes a difference. |
Forum: C++ Dec 18th, 2005 |
| Replies: 13 Views: 15,659 http://www.daniweb.com/techtalkforums/showthread.php?t=36339 |
Forum: C++ Dec 17th, 2005 |
| Replies: 7 Views: 1,647 You don't need pointers here at all to begin with, if you are predetermining your maximum number of doctors at 5. (Also, if you are asking for 5 doctors, why are you only looping from 0 to 2? You... |
Forum: C++ Dec 16th, 2005 |
| Replies: 7 Views: 1,647 Also, anything you create with 'new' needs to be 'deleted' |
Forum: C++ Dec 13th, 2005 |
| Replies: 11 Views: 1,842 Sorry, displayMenu.h and menu.h |
Forum: C++ Dec 12th, 2005 |
| Replies: 11 Views: 1,842 This wouldn't surprise me either as for example you have more than one .h file with the same function:
int main_menu() ( in menu.h and displayMenu.h) |
Forum: C++ Dec 11th, 2005 |
| Replies: 3 Views: 4,394 Check that you aren't missing a } or have 2 }} when you should only have 1. I've had silly errors like that give me hundreds of compiler errors.. |
Forum: C++ Dec 4th, 2005 |
| Replies: 4 Views: 1,725 Tim,
As I mentioned in my email, you've got to make this question a lot clearer.... |
Forum: C++ Dec 3rd, 2005 |
| Replies: 2 Views: 2,801 http://www.cprogramming.com/tips/showTip.php?tip=42&count=30&page=0 |
Forum: C++ Aug 15th, 2005 |
| Replies: 4 Views: 4,596 Not sure about linux, but on solaris, you need to update your LD_LIBRARY_PATH environment variable to include the directory with the shared objects you want to load... (and on AIX, it's LIBPATH)...... |
Forum: C++ Jul 17th, 2005 |
| Replies: 13 Views: 84,758 I know what you mean...
By the way, no need to quote the entire previous posting when putting a reply (only the relevant piece).. |
Forum: C++ Jul 16th, 2005 |
| Replies: 13 Views: 84,758 So Picky ;). As you wish:
#include <iostream>
using namespace std;
void prime_num(int);
int main()
{
cout << " Enter a number and I will generate the prime numbers up to that number: ";
int... |
Forum: C++ Jul 16th, 2005 |
| Replies: 13 Views: 84,758 Here's what I went with. Note you want to do a break if you find out it's divisible as there is no point in checking all the numbers beyond it for divisibility..
#include <iostream>
using... |
Forum: C++ Jul 9th, 2005 |
| Replies: 14 Views: 2,327 Did you copy and paste what dave wrote and compiled it? |
Forum: C++ May 23rd, 2005 |
| Replies: 2 Views: 1,437 I don't see the need for "\n" on this line...
cin >>typed_choice>> "\n"; |