Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 11th, 2005, 10:53 PM   #21
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
Jubitzu, i don't care if somebody comes on these forums asking how to make a fucking strawberry cheesecake. A member should respond with respect for the person who posted.
__________________

tempest is offline   Reply With Quote
Old Jun 12th, 2005, 7:35 AM   #22
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 545
Rep Power: 4 Ancient Dragon is on a distinguished road
Quote:
Originally Posted by stevengs
That is certainly sound advice. That book really is trash. I like Stroustrup, but must admit it is not necessarily the easiest to read on the first go. K&R should not be missing in any set of C/C++ references, even if you intend to develop object orientedly ( )
I think K&R should go into the trash just like C++ For Dummies. There are a lot of other better-written books than K&R.
Ancient Dragon is offline   Reply With Quote
Old Jun 12th, 2005, 7:59 AM   #23
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,223
Rep Power: 5 grumpy is on a distinguished road
Quote:
Originally Posted by Ancient Dragon
There are a lot of other better-written books than K&R.
I disagree. K&R is quite well written. The main weakness is that it isn't terribly current - things have moved on since. But if you want understand how C and C++ evolved (eg why some of those archaic features are there, and why they are used in existing code), K&R will be an essential part of your library.
grumpy is offline   Reply With Quote
Old Jun 12th, 2005, 8:22 AM   #24
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
While I'm not a fan of Eckel - he explains concepts very well, but his teaching methods aren't exactly amazing - I have to agree that C++ for Dummies is absolutely terrible. C for Dummies, on the other hand, is a classic.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jun 12th, 2005, 9:31 AM   #25
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 545
Rep Power: 4 Ancient Dragon is on a distinguished road
Quote:
Originally Posted by grumpy
I disagree. K&R is quite well written. .
Sure, if you have a Ph.D. in computer science :eek:
Ancient Dragon is offline   Reply With Quote
Old Jun 18th, 2005, 6:37 AM   #26
ands122
Newbie
 
Join Date: Jun 2005
Posts: 5
Rep Power: 0 ands122 is on a distinguished road
ok I just got a new compiler and after a lot of corrections, fixed the problem. so nobody has to help me (or flame me o_O) anymore. thanks for your help everyone.
ands122 is offline   Reply With Quote
Old Jun 18th, 2005, 3:40 PM   #27
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Quote:
Originally Posted by Ancient Dragon
Sure, if you have a Ph.D. in computer science :eek:
I don't have a Ph.D. in computer science yet, but I liked, and still like K&R a lot.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Jul 3rd, 2005, 10:51 AM   #28
clearbit
Newbie
 
clearbit's Avatar
 
Join Date: Jun 2005
Location: far..far..away
Posts: 25
Rep Power: 0 clearbit is on a distinguished road
is it just me but this seems a little weird

int main(int nNumberofArgs, char* pszArgs[])
...
//standard should be
int main(int argc, char *argv[])

I guess im just use to the conventional way, but since it is a parameter i guess you could just use those arguments.
clearbit is offline   Reply With Quote
Old Jul 3rd, 2005, 10:56 AM   #29
clearbit
Newbie
 
clearbit's Avatar
 
Join Date: Jun 2005
Location: far..far..away
Posts: 25
Rep Power: 0 clearbit is on a distinguished road
Quote:
Originally Posted by nnxion
Something more elegant like this should work
#include <iostream>
#include <string>

using std::string;
using std::cout;
using std::cin;
using std::endl;

int main(int nNumberofArgs, char* pszArgs[])
{
	int schoice = 1;
	cout << "You wake up from a sleep that you\n"
	<< "can't remember... That's odd...\n"
	<< "You find yourself next to a city.\n"
	<< "You also see some money next to you.\n"
	<< "Do you want to go to the market,\n"
	<< "or explore? \n";

	while(schoice)
	{

		cout << "Type in either 1 to explore or 2 to go to market and 0 to exit\n";
		cin >> schoice;

		switch(schoice)
		{
			case 2:
				cout  << "You walk into the market\n\n" << endl;
				break;
			case 1:
				cout  << "You explore. But of course,\n"
				<< "as you should've expected,\n"
				<< "you die. You don't know how,\n"
				<< "you just do.\n" << endl;
				break;
			case 0:
				cout << "Exiting\n";
				break;
			default:
				cout << "You didn't enter a valid command.\n" << endl;
				break;
		}
	}
}


Can i ask why you put a while loop??
clearbit is offline   Reply With Quote
Old Jul 3rd, 2005, 11:05 AM   #30
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
So it asks the question over and over again until the user enters "0". It'll be handy when there's more steps involved.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:05 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC