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 Feb 5, 2009 | 05:20 PM
  #1  
KasbeKZ's Avatar
Thread Starter
Pr0n Addict
 
Joined: Sep 2007
Posts: 4,617
From: virginia
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.
Old Feb 5, 2009 | 05:36 PM
  #2  
NismoPick's Avatar
The Good Twin
 
Joined: Aug 2005
Posts: 20,639
From: Wild Wild West, UTAH!
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.
Old Feb 5, 2009 | 05:45 PM
  #3  
KasbeKZ's Avatar
Thread Starter
Pr0n Addict
 
Joined: Sep 2007
Posts: 4,617
From: virginia
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!
Old Feb 6, 2009 | 05:14 PM
  #4  
duowing's Avatar
NisTuner
 
Joined: Sep 2005
Posts: 2,800
From: Cleveland, Ohio
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.
Old Feb 6, 2009 | 08:07 PM
  #5  
KasbeKZ's Avatar
Thread Starter
Pr0n Addict
 
Joined: Sep 2007
Posts: 4,617
From: virginia
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.
Old Feb 13, 2009 | 08:16 PM
  #6  
localhostage's Avatar
Registered User
 
Joined: 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.
Old Mar 2, 2009 | 01:17 PM
  #7  
thetremendousti's Avatar
w0rld's l0ngest m0t0rswap
 
Joined: Sep 2007
Posts: 676
From: Torrance, CA
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.
Old Mar 2, 2009 | 02:05 PM
  #8  
KasbeKZ's Avatar
Thread Starter
Pr0n Addict
 
Joined: Sep 2007
Posts: 4,617
From: virginia
now i'm just getting into functions pretty much. i'm doing pretty well. thanks for the help.
Old Mar 2, 2009 | 05:47 PM
  #9  
thetremendousti's Avatar
w0rld's l0ngest m0t0rswap
 
Joined: Sep 2007
Posts: 676
From: Torrance, CA
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
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
lemington22
300ZX (Z32) Forums
1
Feb 23, 2011 03:26 AM
roneski
Vegas 350Z Club
3
Mar 13, 2006 07:39 PM
Fast240Z
240Z, 260Z, 280Z (S30) Forums
2
Mar 7, 2006 05:15 PM
joetemp75
300ZX (Z31) Performance / Technical
1
Jun 22, 2005 06:18 PM
emo236
300ZX (Z32) Performance / Technical
0
Jul 19, 2003 09:28 PM




All times are GMT -7. The time now is 01:28 AM.