Forums have been upgraded to the latest PHPBB3 version. Forum style recovery is pending.

Requesting help with C++ homework please (CODE y u no work)

How may we help you?
User avatar
Lord_Leroy
Posts: 13
Joined: 27 Jul 2011, 10:52
Steam ID: STEAM_0:1:37711060
Location: I do not Exist

Requesting help with C++ homework please (CODE y u no work)

Unread post by Lord_Leroy »

Need to build the program using functions...
______________________________________________________________________________
Recieve the following error:

1>Lowest Score Drop.obj : error LNK2019: unresolved external symbol "void __cdecl getScores(float,int)" (?getScores@@YAXMH@Z) referenced in function _main
1>K:\...\Lowest Score Drop\Debug\Lowest Score Drop.exe : fatal error LNK1120: 1 unresolved externals

______________________________________________________________________________
#include<iostream>

using namespace std;

// Function getScores()
void getScores(float, int);

int main()
{
float scores[6], total;

for (int i = 0; i != 5; i++)
{
getScores(scores, i);
}

system("pause");
return 0;
}


void getScores(float scores[6], int i)
{
do
{
cout << "Enter Score between 1 and 10: ";
cin >> scores;
}
while(scores > 10 || scores < 0);
}
User avatar
Kriegsmarine
Posts: 655
Joined: 10 May 2009, 04:21
Steam ID: STEAM_0:1:22107167
Location: that's a good question...
Contact:

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Kriegsmarine »

did you try not going for a career that involves endless streams of code that makes little sense in the hopes of it doing stuff?
Image
Doke doke doke ushiro metai yatsu wa doke
Haunwulf
•cC• Member
•cC• Member
Posts: 1026
Joined: 23 Dec 2009, 06:10
Steam ID: STEAM_0:0:999999999

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Haunwulf »

Ask a professional coder, And not a bunch of hat obsessed gamers. That's your first clue to solving this homework assignment.

I don't understand this at all. Suprise me guys.
User avatar
Tampashrew
Posts: 1264
Joined: 07 Jun 2010, 07:37
Steam ID: tampashrew
Xbox Gamer Tag: Bizhub72
Location: Tampa, Romania

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Tampashrew »

Put superglue in there somewhere. Superglue solves all the problems in the world.
"If you're looks for my actual porn, I'll give you a hint: A folder labeled "Tax Returns: 1995" shouldn't take up 200 gigs." -Kerplunkers

"7:17 PM - •cC• Sergeant Steve: I've held a horse dick in my hand" - Stevey
User avatar
spleenter
•cC• Member
•cC• Member
Posts: 860
Joined: 15 Apr 2010, 07:24
Steam ID: STEAM_0:0:26021287
Location: Port Charlotte, FL

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by spleenter »

Tampashrew wrote:Put superglue in there somewhere. Superglue solves all the problems in the world.
What superglue doesn't fix Duct tape does.
Think of me what you will, I don't give a crap what you think about me. Nor will i change to please you.
User avatar
Zarik
Posts: 469
Joined: 18 Apr 2010, 04:09
Steam ID: STEAM_0:1:3501639
Location: NJ
Contact:

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Zarik »

Hmmm to bad i don't take C++ until next semester :P


They made me take Visual Basic first D:
User avatar
Lord_Leroy
Posts: 13
Joined: 27 Jul 2011, 10:52
Steam ID: STEAM_0:1:37711060
Location: I do not Exist

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Lord_Leroy »

It's all good, I was able to get it done so a Mod can close this thread if they want.
User avatar
Tampashrew
Posts: 1264
Joined: 07 Jun 2010, 07:37
Steam ID: tampashrew
Xbox Gamer Tag: Bizhub72
Location: Tampa, Romania

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Tampashrew »

You're welcome for my advice.
"If you're looks for my actual porn, I'll give you a hint: A folder labeled "Tax Returns: 1995" shouldn't take up 200 gigs." -Kerplunkers

"7:17 PM - •cC• Sergeant Steve: I've held a horse dick in my hand" - Stevey
User avatar
Beetle
•cC• Member
•cC• Member
Posts: 2243
Joined: 28 Dec 2008, 01:33
Steam ID: STEAM_0:1:2945765
Location: North Carolina

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Beetle »

I had to take Java first
Click Here to go to my Mapping Blog.
User avatar
Zarik'sBrother
Posts: 52
Joined: 20 Jul 2011, 12:34
Steam ID: STEAM_0:0:2443464
Xbox Gamer Tag: L0giK 5

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Zarik'sBrother »

Lord_Leroy wrote:Need to build the program using functions...
______________________________________________________________________________
Recieve the following error:

1>Lowest Score Drop.obj : error LNK2019: unresolved external symbol "void __cdecl getScores(float,int)" (?getScores@@YAXMH@Z) referenced in function _main
1>K:\...\Lowest Score Drop\Debug\Lowest Score Drop.exe : fatal error LNK1120: 1 unresolved externals

______________________________________________________________________________
#include<iostream>

using namespace std;

// Function getScores()
void getScores(float, int);

int main()
{
float scores[6], total;

for (int i = 0; i != 5; i++)
{
getScores(scores, i);
}

system("pause");
return 0;
}


void getScores(float scores[6], int i)
{
do
{
cout << "Enter Score between 1 and 10: ";
cin >> scores;
}
while(scores > 10 || scores < 0);
}
Other than the code not appearing to be in a working order why would you initialize your loop at 0 and set the end condition to when i does not equal five, your loop hits it's end condition immediately.

Zarik you havn't learned loops yet? All languages are basically the same bro, pay more attention!
User avatar
Celtic
Posts: 470
Joined: 07 Sep 2009, 07:43
Steam ID: STEAM_0:1:37669475

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Celtic »

28 Sep 2011, 05:09

u:
Posted: 5 minutes ago
User avatar
Zarik'sBrother
Posts: 52
Joined: 20 Jul 2011, 12:34
Steam ID: STEAM_0:0:2443464
Xbox Gamer Tag: L0giK 5

Re: Requesting help with C++ homework please (CODE y u no wo

Unread post by Zarik'sBrother »

Haha celtic, thanks for pointing that out. I was looking at the forum and i guess this thread was right underneath one from december, otherwise I wouldn't have posted.. or perhaps I would have, just to pick on my little bro xD
Post Reply