| C++ and how I wish I'd learnt it years ago |
[17 Oct 2003|02:26am] |
Hello all!
I'm a fairly adequately advanced developer in the web sense - C# is something I've taken to in the last year and a half. However, I have yet to realise the power of C++, raved about by so many! I have a few questions which I am hoping some of you might be able to answer for me:
1. Which compilers / IDEs are used most commonly to write cpp? And are there any good FREE ones out there that I should be getting hold of? What version of C++ do most people write in these days?
2. This one may inspire some debate (Apologies in advance). What are the pros and cons of C++? And why is it so great?
Merci mille fois :)
Look forward to hearing your answers.
|
|
|
[17 Oct 2003|03:51pm] |
hi, i have been playing with this code, and it's supposed to terminate on EOF, but i can't seem to figure out when exactly that... happens? when i press enter, it just goes to the next line. the only way to terminate is through ^C, but that way it obviously doesn't give the line count. i'm using cc to compile and am running this through ssh on my linux box. code:
#include [ Error: Irreparable invalid markup ('<stdio.h>') in entry. Owner must fix manually. Raw contents below.] hi, i have been playing with this code, and it's supposed to terminate on EOF, but i can't seem to figure out when exactly that... happens? when i press enter, it just goes to the next line. the only way to terminate is through ^C, but that way it obviously doesn't give the line count. i'm using <code>cc</code> to compile and am running this through ssh on my linux box. code: <pre style="padding:5px; margin-left: 20px; border: dashed 1px #333; font-size: 12px;">#include <stdio.h>
// count inputted characters main (){ double nc; //number of characters
for(nc=0;getchar()!=EOF; ++nc) ;
printf("%.0f\n", nc); //after the loop finishes, print the number of inputted characters } </pre>
any ideas of why it's not terminating on new line? does EOF work in some other way?
|
|