Programming -- a group effort

Reply

Join Date: Jul 2005
Posts: 472
Reputation: MIGSoft is an unknown quantity at this point 
Solved Threads: 1
MIGSoft's Avatar
MIGSoft MIGSoft is offline Offline
Posting Pro in Training

Programming -- a group effort

 
0
  #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()
{


}
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,221
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 538
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Programming -- a group effort

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

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

return o;

}
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Programming -- a group effort

 
0
  #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 Quick reply to this message  
Join Date: Jul 2005
Posts: 472
Reputation: MIGSoft is an unknown quantity at this point 
Solved Threads: 1
MIGSoft's Avatar
MIGSoft MIGSoft is offline Offline
Posting Pro in Training

Re: Programming -- a group effort

 
0
  #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 Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Programming -- a group effort

 
0
  #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 8:21 am.
==========================================
Yadda yadda yadda...
Web junky, fevered monkey
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 1,181
Reputation: hollystyles will become famous soon enough hollystyles will become famous soon enough 
Solved Threads: 67
hollystyles's Avatar
hollystyles hollystyles is offline Offline
Veteran Poster

Re: Programming -- a group effort

 
0
  #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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC