943,937 Members | Top Members by Rank

Ad:
Jun 27th, 2006
0

Programming -- a group effort

Expand Post »
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()
{


}
Similar Threads
Reputation Points: 10
Solved Threads: 1
Posting Pro in Training
MIGSoft is offline Offline
472 posts
since Jul 2005
Jul 4th, 2006
0

Re: Programming -- a group effort

int main()
{
#include <iostream.h>
int num

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

return o;

}
Moderator
Featured Poster
Reputation Points: 1784
Solved Threads: 574
Moderator
jbennet is offline Offline
16,520 posts
since Apr 2005
Jul 4th, 2006
0

Re: Programming -- a group effort

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;

}
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Jul 4th, 2006
0

Re: Programming -- a group effort

#include <iostream.h>

using namespace std;

//char charNum(int num);

int main()
{

int num;

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

}
Reputation Points: 10
Solved Threads: 1
Posting Pro in Training
MIGSoft is offline Offline
472 posts
since Jul 2005
Jul 5th, 2006
0

Re: Programming -- a group effort

#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.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Jul 5th, 2006
0

Re: Programming -- a group effort

Try entering 1073741824 at the prompt, C++ is not as good at maths as you might think! now why is that I wonder ?
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in IT Professionals' Lounge Forum Timeline: Measuring the mood of the Internet
Next Thread in IT Professionals' Lounge Forum Timeline: Changing from Extension to TYPO3





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC