2 Questions one on code, and another on Unix

Started by
5 comments, last by Android 13 22 years, 5 months ago
First off, i was wondering if someone out there could give me a good site that helps with Unix. I just got into it, and i want to learn some commands and how to use it. Now the other thing is, i wrote a small program just to practice HTML. And it wont multiply where it is supposed to multiply, i was wondering if you could tell me why, it is in C++ and compiled in DevC++(note: This post was not spell checked) Here is the source code; //Monster Fighter is a basic battle program to //Practice C++ #include int userLvl; int monsterLvl; int f = 0; int main() { //white space, specification term to center text here cout << "Welcome to Monster Fighter V 1.0 created by: Adam Osterkamp.\n"; cout << "Please enter your Power Level 1,000 - 10,000: "; cin >> userLvl; cout << "Please choose a Monster Level between 1-5: "; cin >> monsterLvl; if (monsterLvl < 1 || monsterLvl > 5) { cout << "You cant do that! Restart the Program Fool!"; cin.ignore(256,''\n''); cout<<"press enter to continue..."< userLvl) { cout << "HA! Your weak, get stronger and try again!"; cin.ignore(256,''\n''); cout<<"press enter to continue..."<<endl; cin.get(); } f++; } return 0; } Mess with the best, Die like the rest!!
Mess with the best,Die like the rest!!
Advertisement
monsterLvl * 1000;

This doesn''t do what you want it to. Change it to one of these:
monsterLvl *= 1000;
monsterLvl = monsterLvl * 1000;
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
OF COURSE!!! Thanks you very much!!

Mess with the best,
Die like the rest!!
Mess with the best,Die like the rest!!
man pages are your friend. Linux, for example, can be issued the command: man -k opengl sdl and it will list available docs on openGL and SDL functions. Similar functions can be used across all *nix platforms. You should have everything you need right there on your box to become quiet the guru.

Google is your friend too. I really suggest you explorer my previous point before you result to the net. I''m not sure if you are running a true "Unix" in the classic sense or a flavor of. Probably the latter since the former can be expensive.
www.google.com/bsd
www.google.com/linux
Either one of those will return only links related to those OS''s.

YAP-YFIO

-deadlinegrunt

~deadlinegrunt

Might I add that Linux has a ton of HOWTOs (generally in the /usr/doc/en/html/HOWTO folder). Read them; they''ve got some good stuff.
Another good call. Thanks Oluseyi, can''t believe I didn''t mention that originally.

I''ll try to make up for it: www.linuxdoc.org

YAP-YFIO

-deadlinegrunt

~deadlinegrunt

Well im not ''running'' the Unix right now, but im going to be and i wanted to learn some stuff first. I LOVE linux, but my linux box is down right now, seeing as i dont have a mother board or CPU, so im on my laptop, stuck with Windows, because im too lazy to change this stuff. But thank you all very much!!

Mess with the best,
Die like the rest!!
Mess with the best,Die like the rest!!

This topic is closed to new replies.

Advertisement