| | |
Programming -- a group effort
![]() |
Here is how you play, I will start. I write one line of the program, and each next poster can add ONE more line to it. Come on all you geeks out there, lets do it!
int main()
{
} Ok now it compiles (missing ; and include pre-processor moved to correct position, using namespace added, return o changed to return 0), one line at a time only and must compile.
Single statements and variable declarations no problem.
To start a function start with the declaration by adding as a comment (eg //void somefunction(int param); next guy starts a stub again as a comment //void blah... , when it's a compilable stub next guy can remove comments, then next guy (or gal of course) can start adding statements ONE line at a time only..
Single statements and variable declarations no problem.
To start a function start with the declaration by adding as a comment (eg //void somefunction(int param); next guy starts a stub again as a comment //void blah... , when it's a compilable stub next guy can remove comments, then next guy (or gal of course) can start adding statements ONE line at a time only..
#include <iostream.h>
using namespace std;
//char charNum(int num);
int main()
{
int num;
cout << "enter number";
cin >> num;
return 0;
}#include <iostream.h>
using namespace std;
//char charNum(int num);
int main()
{
int num;
cout << "enter number";
cin >> num;
num = num *2;
return 0;
}#include <iostream.h>
using namespace std;
//char charNum(int num);
int main()
{
int num;
cout << "enter number ";
cin >> num;
num = num *2;
cout << "I doubled your number: " << num << "\n"; cin.ignore(); cin.get();
return 0;
}Thinks: Explore the entire iostream library one line at a time? might be useful for noobs browsing for C++ stuff.
Last edited by hollystyles; Jul 5th, 2006 at 8:21 am.
![]() |
Similar Threads
Other Threads in the IT Professionals' Lounge Forum
- Previous Thread: How long will the chicken survive without its head
- Next Thread: Changing from Extension to TYPO3
| Thread Tools | Search this Thread |
1gbit advertising advice amazon answers archive british broadband business businessprocesses career carrier censorship cern china cio collectiveintelligence connectivity consumer consumers corporateearnings datatransfer debtcollectors dictionary digg digital ebay ecommerce email employment environment facebook food government grid high-definition hottub infodelivery infotech intel internet interview ipod isp japan kindle lhc library malware marketing mit moonfruit news onlineshopping piracy piratebay pope porn program questions r&d religion remoteworking research retail security sex shopping simple skype smallbusiness smb sms socialmedia socialnetworking software softwareengineer spam speed spending startrek statistics stocks study stumbleupon survey tabletpc technology touch-screen touchscreen twitter uk videoinprint voips web webdeveloper windows words






