User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Jul 2005
Posts: 472
Reputation: MIGSoft is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
MIGSoft's Avatar
MIGSoft MIGSoft is offline Offline
Posting Pro in Training

Programming -- a group effort

  #1  
Jun 27th, 2006
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()
{


}
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Old Hampshire, Old England (LOL)
Posts: 11,937
Reputation: jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough 
Rep Power: 30
Solved Threads: 268
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Microsoft Fanboy

Re: Programming -- a group effort

  #2  
Jul 4th, 2006
int main()
{
#include <iostream.h>
int num

cout << "enter number";
cin >> num;

return o;

}
Reply With Quote  
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Rep Power: 7
Solved Threads: 58
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Programming -- a group effort

  #3  
Jul 4th, 2006
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..

#include <iostream.h>

using namespace std;

//char charNum(int num);

int main()
{

int num;

cout << "enter number";
cin >> num;

return 0;

}
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote  
Join Date: Jul 2005
Posts: 472
Reputation: MIGSoft is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
MIGSoft's Avatar
MIGSoft MIGSoft is offline Offline
Posting Pro in Training

Re: Programming -- a group effort

  #4  
Jul 4th, 2006
#include <iostream.h>

using namespace std;

//char charNum(int num);

int main()
{

int num;

cout << "enter number";
cin >> num;
num = num *2;
return 0;

}
Reply With Quote  
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Rep Power: 7
Solved Threads: 58
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Programming -- a group effort

  #5  
Jul 5th, 2006
#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.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote  
Join Date: Feb 2005
Location: Braintree, UK
Posts: 1,165
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Rep Power: 7
Solved Threads: 58
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Programming -- a group effort

  #6  
Jul 5th, 2006
Try entering 1073741824 at the prompt, C++ is not as good at maths as you might think! now why is that I wonder ?
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Techies' Lounge Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Techies' Lounge Forum

All times are GMT -4. The time now is 3:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC