Home

Egg Directory / Search

New Eggs / Best of New

New Blogs / Pics / Activity
New Files / Movies
Community Forum

Group Directory

 

 
General Discussion
Talk about anything under the sun, unless it’s against the rules.
You must have a member level of 3 or greater to post new topics here and a level of 3 to post replies.
C++ help
   
Post New Topic Post Reply Add To Watchlist
Author
Message


dojob


Normal Egg
Member Lvl: 7
Egg Points: 12187
Posts: 307

Posted: Nov 13, 2006 7:11 p.m. - Subject: C++ help

I’m currently learing C++ in school, and I am working on a program that creates 25 random numbers between 1 and 25, then sorts them even and odd.
like so:
Even: (all even nums)
Odd: (all odd nums)
I get no errors when compiling, but when linking I get the following errors:

C08E01.OBJ : error LNK2001: unresolved external symbol "public: bool & __thiscall vector::operator[](int)" (??A?$vector@_N@@QAEAA_NH@Z)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: int & __thiscall vector::operator[](int)" (??A?$vector@H@@QAEAAHH@Z)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: __thiscall vector::~vector(void)" (??1?$vector@_N@@QAE@XZ)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: __thiscall vector::~vector(void)" (??1?$vector@H@@QAE@XZ)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: __thiscall vector::vector(class vector const &)" (??0?$vector@H@@QAE@ABV0@@Z)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: __thiscall vector::vector(class vector const &)" (??0?$vector@_N@@QAE@ABV0@@Z)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: __thiscall vector::vector(void)" (??0?$vector@_N@@QAE@XZ)
C08E01.OBJ : error LNK2001: unresolved external symbol "public: __thiscall vector::vector(void)" (??0?$vector@H@@QAE@XZ)
Debug/C08E01.exe : fatal error LNK1120: 8 unresolved externals
Error executing link.exe.[/code]

Code in next post.


dojob


Normal Egg
Member Lvl: 7
Egg Points: 12187
Posts: 307

Posted: Nov 13, 2006 7:13 p.m. - Subject:

here is my code:
[code]#include
#include
#include
typedef int VarType;
int RandNum()
{ VarType Num;
randomize();
Num=random(15+1);
return(Num);
}
int SortNums(vector &NumberArray, vector &TrueFalse)
{
for(int i=0;i=24;i++)
NumberArray[i]=RandNum();
for(i=0;i=24;i++)
{ if(NumberArray[i]%2==0)
TrueFalse[i]=true;
else
TrueFalse[i]=false;
}
return(0);
}
void DisplayNums(vector NumberArray, vector TrueFalse)
{ cout


dojob


Normal Egg
Member Lvl: 7
Egg Points: 12187
Posts: 307

Posted: Nov 13, 2006 7:14 p.m. - Subject:

wtf it got cut off


dojob


Normal Egg
Member Lvl: 7
Egg Points: 12187
Posts: 307

Posted: Nov 13, 2006 7:16 p.m. - Subject:

*sigh*
http://h1.ripway.com/dojob/C08E01.CPP
there


c0w_tipp3r


Power Egg
Member Lvl: 10
Egg Points: 12624
Posts: 1928
AIM YIM

Posted: Nov 14, 2006 12:59 p.m. - Subject:

[quote]void DisplayNums(vector NumberArray, vector TrueFalse) { cout


c0w_tipp3r


Power Egg
Member Lvl: 10
Egg Points: 12624
Posts: 1928
AIM YIM

Posted: Nov 14, 2006 1:00 p.m. - Subject:

[quote] void DisplayNums(vector NumberArray, vector TrueFalse)
{ cout


c0w_tipp3r


Power Egg
Member Lvl: 10
Egg Points: 12624
Posts: 1928
AIM YIM

Posted: Nov 14, 2006 1:01 p.m. - Subject:

fuck, it did it again

check the part where it says i=25

it should say 24


-PapaSmurf-


Power Egg
Member Lvl: 10
Egg Points: 11486
Posts: 1132
AIM YIM

Posted: Nov 14, 2006 1:03 p.m. - Subject:

Anyone know any good C++ tutorial sites? I wanna learn to use it, always been one of my wet-dreams.


c0w_tipp3r


Power Egg
Member Lvl: 10
Egg Points: 12624
Posts: 1928
AIM YIM

Posted: Nov 14, 2006 1:21 p.m. - Subject:

not really, i just have books, but check out some online forums, those are usually the best place to look for help


-PapaSmurf-


Power Egg
Member Lvl: 10
Egg Points: 11486
Posts: 1132
AIM YIM

Posted: Nov 14, 2006 1:45 p.m. - Subject:

K thanx



Posted: Nov 14, 2006 2:00 p.m. - Subject:

You suck at C++.


c0w_tipp3r


Power Egg
Member Lvl: 10
Egg Points: 12624
Posts: 1928
AIM YIM

Posted: Nov 14, 2006 2:58 p.m. - Subject:

Quote:
You suck at C++.

if you are refering to me, then yes you’re right, i haven’t used the language in 3 years.
   
Home | Contact Us | Sign Up
Visit our companion site, Prankpedia.com
Please read the LEGAL DISCLAIMER & CONTENT GUIDELINES
© 2008 rotteneggs.com - A Social Network for Pranksters.
6.512417 (Server 2)