>>Whenever I attempt to run this program,
Since you are new -- you did not run this program, but you compiled this program". If you are going to learn programming then you need to also learn programming jargon. "run a program" means the program is already compiled and you can execute it, just like you execute most other programs on your computer.
And for future reference when you post questions and code it is very helpful to everyone if you would also indicate the compiler you used, its version (if known) and the operating system you are using.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
main() should be int main()
there is no semicolon after unsigned long k
Just my own personal thing ... use endl in c++ and \n in c :)
cscgal
The Queen of DaniWeb
19,422 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 230
main() should be int main()
there is no semicolon after unsigned long k
Just my own personal thing ... use endl in c++ and \n in c :)
Yes good advice, using endl in c++ also flushes the buffer however, it would also be acceptable to use '\n' as well.
Hey Dani did you get my PM? :cry:
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439