•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Techies' Lounge section within the Tech Talk category of DaniWeb, a massive community of 402,462 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,979 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Techies' Lounge advertiser: Programming Forums
Views: 1105 | Replies: 5
![]() |
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()
{
}
•
•
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation:
Rep Power: 30
Solved Threads: 268
•
•
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation:
Rep Power: 7
Solved Threads: 58
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;
}•
•
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation:
Rep Power: 7
Solved Threads: 58
#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 7:21 am.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Techies' Lounge Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
api apple asm assembly x86 programming hla demo blogger blogging c c++ ccna christmas cocoa code coding competition compiler computer debugging developer development evaluation framework gartner group gdata google high-performance innovation investors java linerider mcse microsystems networking news next object online oriented planning platform programming python rss software step steps stocks sun technology tools tutorials xml
Other Threads in the Techies' Lounge Forum
- Previous Thread: The Operating System project....
- Next Thread: can anyone help me out...



Linear Mode