Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalhelp for INA Grid Control Pin
skpanda4-Feb-04 20:47
skpanda4-Feb-04 20:47 
GeneralInsert Slider Control Pin
swarnamanoo4-Feb-04 19:20
swarnamanoo4-Feb-04 19:20 
GeneralRe: Insert Slider Control Pin
David Crow5-Feb-04 3:32
David Crow5-Feb-04 3:32 
QuestionChanging the Background color of dialog? Pin
Prakash Nadar4-Feb-04 19:01
Prakash Nadar4-Feb-04 19:01 
AnswerRe: Changing the Background color of dialog? Pin
PJ Arends4-Feb-04 19:14
professionalPJ Arends4-Feb-04 19:14 
GeneralRe: Changing the Background color of dialog? Pin
Prakash Nadar4-Feb-04 19:53
Prakash Nadar4-Feb-04 19:53 
AnswerRe: Changing the Background color of dialog? Pin
RChin5-Feb-04 1:54
RChin5-Feb-04 1:54 
GeneralHelp with Static Variables Pin
darth_infamous4-Feb-04 17:34
sussdarth_infamous4-Feb-04 17:34 
I'm trying to pass my local variables of one function to another fuction, all within the main. I get errors saying that the variables score1-score5 are undeclared. Here is what I'm trying to do so far:

#include <iostream>

using namespace std;

void getvalues();
void findlowest();
void calcaverage();

int main()
{
getvalues();

return 0;
}

void getvalues()
{
static int score1, score2, score3, score4, score5=0;

cout << "What is score 1? ";
cin >> score1;
cout << "What is score 2? ";
cin >> score2;
cout << "What is score 3? ";
cin >> score3;
cout << "What is score 4? ";
cin >> score4;
cout << "What is score 5? ";
cin >> score5;

findlowest();
}

void findlowest()
{
if (score1 < score2 && score1 < score3 && score1 < score4 && score1 < score5)
{
return score1;
}

if (score2 < score1 && score2 < score3 && score2 < score4 && score2 < score5)
{
return score2;
}

if (score3 < score1 && score3 < score2 && score3 < score4 && score3 < score5)
{
return score3;
}

if (score4 < score1 && score4 < score2 && score4 < score3 && score4 < score5)
{
return score4;
}

if (score5 < score1 && score5 < score2 && score5 < score3 && score5 < score4)
{
return score5;
}
}
GeneralRe: Help with Static Variables Pin
wb4-Feb-04 18:55
wb4-Feb-04 18:55 
GeneralRe: Help with Static Variables Pin
twing4-Feb-04 19:10
twing4-Feb-04 19:10 
GeneralRe: Help with Static Variables Pin
rrrado4-Feb-04 23:08
rrrado4-Feb-04 23:08 
GeneralCopying Directory and contents Pin
azusakt4-Feb-04 17:23
azusakt4-Feb-04 17:23 
GeneralRe: Copying Directory and contents Pin
PJ Arends4-Feb-04 19:05
professionalPJ Arends4-Feb-04 19:05 
GeneralSQL in CHTMLView Pin
Frank Deo4-Feb-04 14:21
Frank Deo4-Feb-04 14:21 
Generalconnecting through ISA server Pin
anonymous1984-Feb-04 12:24
anonymous1984-Feb-04 12:24 
GeneralA silly question about CFile Pin
bin89224-Feb-04 12:23
bin89224-Feb-04 12:23 
GeneralRe: A silly question about CFile Pin
Antti Keskinen4-Feb-04 12:56
Antti Keskinen4-Feb-04 12:56 
GeneralRe: A silly question about CFile Pin
Abin4-Feb-04 18:37
Abin4-Feb-04 18:37 
GeneralThanks a lot. Pin
bin89224-Feb-04 19:17
bin89224-Feb-04 19:17 
GeneralRecursion... Pin
xzigax4-Feb-04 11:57
xzigax4-Feb-04 11:57 
GeneralRe: Recursion... Pin
Antti Keskinen4-Feb-04 13:08
Antti Keskinen4-Feb-04 13:08 
GeneralMoving objects on a form... Pin
Anonymous4-Feb-04 11:48
Anonymous4-Feb-04 11:48 
GeneralCan't receive WM_DRAWITEM message. Pin
Cael4-Feb-04 11:25
Cael4-Feb-04 11:25 
GeneralRe: Can't receive WM_DRAWITEM message. Pin
basementman4-Feb-04 11:34
basementman4-Feb-04 11:34 
GeneralRe: Can't receive WM_DRAWITEM message. Pin
Cael4-Feb-04 12:51
Cael4-Feb-04 12:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.