3dmm.com

3dmm Chatroom: Daily meetings at 11pm GMT (6pm EST)
Go Back   3dmm.com > Miscellaneous > Testing Forum
User Name
Password
Register Site Rules FAQ Members List

View Poll Results: 0 or 1?
False 2 50.00%
True 2 50.00%
Multiple Choice Poll. Voters: 4. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old 07-17-2010, 09:17 PM   #1
Xeros
Member
Xeros's Avatar
Join Date: Apr 2004
Posts: 667
Spreading C++ knowledge like legs.. on toast.

I'm going to be using this simple C++ program full of comments to help teach a fellow friend. He is my student, even though I am barely experienced.

Code:
// Author: Nohbdy Ahtall // Date: July 17, 2010 /* This program will ask for your name, it will then ask you to re-type your name exactly if you want to have the computer make a sound.*/ #include <iostream> // this loads the preprocessor directive which includes "cout" and "cin" #include <string> // Wtf is this? ... Just kidding, it loads the "string".. thing. using namespace std; // This is for lazy people who can't type "std::" before every... thing(e.g. "std::cout" instead of "cout). int main() // A program always starts at the "int main()" no matter where it is, at least that's what I heard. { // This is a bracket, everything in between the brackets is called the "scope", right? cout << "What is your name?" << endl; // This asks you for your name, you know, in English. string YourNAME; // This is where the name you enter will be stored in the computers BRAIN :O ZOMG. cin >> YourNAME; // This is where you finally answer the poor computer's questions. The computer could have done billions of additions within the seconds it took you to read and answer. cout << "\nHello " << YourNAME << ", nice to meet you." << endl; // It says your name back to you because, as I just FUCKIN' ALREADY SAID, YourNAME equals whatever you typed. // There is nothing here, except for this comment. Is a comment really nothing though? cout << "If you'd like to hear a sound, re-type your name!\n(Your Name is " << YourNAME << " by the way)\n"; // If you'd like to make a call, please hang up and try again. This is where the copmuter says you're name, in case you're an idiot. string RetypeNAME; // Yep. cin >> RetypeNAME; // (See above) if (RetypeNAME == YourNAME) // If the second thing you typed is the same as the first, then... { // This is a bracket within two brackets, don't ask questions. cout << "\n#@$% you " << RetypeNAME << "! Ahahahaa!\a\n\n" << endl; // Wtf? Fuck you too computer! } else // Otherwise, do this... { cout << "......Fine then...dick." << endl; // Right here the program is an asshole. } return 0; // This information is confidential. } // }


Xeros is offline   Reply With Quote
Old 07-18-2010, 02:19 AM   #2
Orcus
Senior Member
Orcus's Avatar
Join Date: Feb 2003
Posts: 8,146
messy ass comments
Orcus is offline   Reply With Quote
Old 07-18-2010, 02:36 AM   #3
Nokes
Senior Member
Nokes's Avatar
Join Date: Feb 2008
Posts: 2,375
what the hell!? something messed up my Emesene!


Nokes is offline   Reply With Quote
Old 07-19-2010, 04:06 PM   #4
Pirate Balloon
Senior Member
Pirate Balloon's Avatar
Join Date: Dec 2003
Posts: 7,911
java's better
Pirate Balloon is offline   Reply With Quote
Old 07-19-2010, 04:51 PM   #5
Xeros
Member
Xeros's Avatar
Join Date: Apr 2004
Posts: 667
I am sure Java is better when it comes to ease of coding, but that isn't an issue for me, nor do I really see it as an issue for anyone other than... people who don't like to code a lot. I know the counter-argument, where if that's the case then why not write assembly or machine code. Well, C++'s focus on re-usability kinda solves that problem and in my opinion that's to be my counter-counter-argument.

Also for what I'm about to say, I'm not saying "Java is slow"..... but honestly, every single Java program I encounter on this computer does indeed always show some amount of slow-ness or lag, so, for me and my computer Java IS slow.

That may not be an issue when it comes to today's personal computers(other than mine), but I plan on also working with memory-efficient robotic hardware and other customized hardware.(Not to mention that I need to deal with this 256mb RAM computer at the present time for learning, I want to make sure a program is being slow because of me and not the computer)


Xeros is offline   Reply With Quote
Reply



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

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


Sig Police

Contact Us | RSS Feed | Top

Powered By ezboard Ver. 5.2
Copyright ©1999-2000 ezboard, Inc.
Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.