The Lounge (Off Topic) Talk about daily events, or other items not really related to the ZCars in any way.

anyone good at C++?

Thread Tools
 
Search this Thread
 
Old 02-05-2009, 05:20 PM
  #1  
Pr0n Addict
Thread Starter
 
KasbeKZ's Avatar
 
Join Date: Sep 2007
Location: virginia
Posts: 4,617
anyone good at C++?

anyone good at C++ that can help me for a few? got a few basic questions and may have more later. my project is due tomorrow....

firstly, i know the basic idea of what these do
#include<iostream>
#include<cmath>
#include<iomanip>

how do i know which of those i need for what i'm doing? i know i always have to use iostream because of this compiler. and cmath because i use numbers? what else do i need because of what? those are just examples i found on an example that was given to me. if anyone feels like helping for a few minutes, please let me know and i'll shoot out a few more.
KasbeKZ is offline  
Old 02-05-2009, 05:36 PM
  #2  
The Good Twin
 
NismoPick's Avatar
 
Join Date: Aug 2005
Location: Wild Wild West, UTAH!
Posts: 20,639
Ah man... I took that class a couple years ago & hated it. The second the semester was over, I forgot it all.

ZLover probably knows about that program. Have you googled it? There's TONS of C++ tutorials.
NismoPick is offline  
Old 02-05-2009, 05:45 PM
  #3  
Pr0n Addict
Thread Starter
 
KasbeKZ's Avatar
 
Join Date: Sep 2007
Location: virginia
Posts: 4,617
yeah i'm finding a bit of help through google. thanks though. i also hate this class. a lot. it's just about the hardest one i'm taking this semester.

of course he does! zlover knows all! those crazy pictures he posted were made with C++ i believe.

next big question: about strings. why is "string" used to define one of my variables? it's just like a title variable. i don't even know why it's there at all!
KasbeKZ is offline  
Old 02-06-2009, 05:14 PM
  #4  
NisTuner
 
duowing's Avatar
 
Join Date: Sep 2005
Location: Cleveland, Ohio
Posts: 2,800
dang I wish I could help you. I knew all this and was really good with it, but I haven't done it in quite a while. Usually if I'm remembering correctly a string was more than one variable or more than one type of variable? Or maybe it was the variable would change types. So it wouldn't be defined so much as an integer, it's just a variable that just gets defined as whatever it's told.
duowing is offline  
Old 02-06-2009, 08:07 PM
  #5  
Pr0n Addict
Thread Starter
 
KasbeKZ's Avatar
 
Join Date: Sep 2007
Location: virginia
Posts: 4,617
thanks dude. i ended up finding a few people to help out. it turns out my room mate did remember a bit of it. this class is so hard though. and seeing as i'm changing my major and will no longer need it, it really sucks to have to be taking it.
KasbeKZ is offline  
Old 02-13-2009, 08:16 PM
  #6  
Registered User
 
localhostage's Avatar
 
Join Date: Feb 2009
Posts: 1
Originally Posted by KasbeKZ
yeah i'm finding a bit of help through google. thanks though. i also hate this class. a lot. it's just about the hardest one i'm taking this semester.

of course he does! zlover knows all! those crazy pictures he posted were made with C++ i believe.

next big question: about strings. why is "string" used to define one of my variables? it's just like a title variable. i don't even know why it's there at all!
So there are a few primitive types you should get used to (or get to know). I'd google primitives.

But just to point you in the right direction:

String, Int, Boolean are some of the important primitives.

You use 'string' because that is the type of data stored inside.

string title = "hello";
int legs = 2;

You can't do, int legs = "hello" because int (Integer) holds numbers only and as you can guess string types hold letters. A string is also known as a char* (an array of chars, aka characters).

int a = 1;
int b = 2;
int c = a + b;

So c would be 3;

But if you did...

string a = "hello";
string b = " world";
string c = a + b;

c would be "hello world".


I know I'm a nerd.. it's how I paid for my Z

PM me if you need more help.
localhostage is offline  
Old 03-02-2009, 01:17 PM
  #7  
w0rld's l0ngest m0t0rswap
 
thetremendousti's Avatar
 
Join Date: Sep 2007
Location: Torrance, CA
Posts: 676
Originally Posted by KasbeKZ
anyone good at C++ that can help me for a few? got a few basic questions and may have more later. my project is due tomorrow....

firstly, i know the basic idea of what these do
#include<iostream>
#include<cmath>
#include<iomanip>

.
okay well iostream is something about basic stream usage such as namespace std;

cmath enables functions such as the sqrt function
iomanip enables manipulation of public and private variables. jk i'm just shooting that out my a** i dont know what it does but i'm in elements of programming semester 2 and i dont know ANYTHING about programming. I passed the class last semester with my 9th grade knowledge of visual basic, and google because the whole class i played DotA, ftw.

what are you doing in programming now? i have a bunch of presentations that actually helped alot if your doing stack/pop/peek/push and if your learning about arrays and memory management.
thetremendousti is offline  
Old 03-02-2009, 02:05 PM
  #8  
Pr0n Addict
Thread Starter
 
KasbeKZ's Avatar
 
Join Date: Sep 2007
Location: virginia
Posts: 4,617
now i'm just getting into functions pretty much. i'm doing pretty well. thanks for the help.
KasbeKZ is offline  
Old 03-02-2009, 05:47 PM
  #9  
w0rld's l0ngest m0t0rswap
 
thetremendousti's Avatar
 
Join Date: Sep 2007
Location: Torrance, CA
Posts: 676
yeah we just took a test on private and public functions, sure was tough but i took the test with all the notes o.0
thetremendousti is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
lemington22
300ZX (Z32) Forums
1
02-23-2011 03:26 AM
roneski
Vegas 350Z Club
3
03-13-2006 07:39 PM
Fast240Z
240Z, 260Z, 280Z (S30) Forums
2
03-07-2006 05:15 PM
joetemp75
300ZX (Z31) Performance / Technical
1
06-22-2005 06:18 PM
emo236
300ZX (Z32) Performance / Technical
0
07-19-2003 09:28 PM



Quick Reply: anyone good at C++?



All times are GMT -7. The time now is 04:58 PM.