Click here to Skip to main content
15,885,244 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: execution time of function increases Pin
Hamid_RT25-May-09 0:53
Hamid_RT25-May-09 0:53 
GeneralRe: execution time of function increases Pin
ThatsAlok25-May-09 3:33
ThatsAlok25-May-09 3:33 
QuestionGet active user's desktop resolution from system account. Pin
«_Superman_»22-May-09 16:39
professional«_Superman_»22-May-09 16:39 
AnswerRe: Get active user's desktop resolution from system account. Pin
Garth J Lancaster22-May-09 20:09
professionalGarth J Lancaster22-May-09 20:09 
QuestionMenu and Icon's Pin
BobInNJ22-May-09 11:18
BobInNJ22-May-09 11:18 
AnswerRe: Menu and Icon's Pin
Stuart Dootson22-May-09 11:41
professionalStuart Dootson22-May-09 11:41 
QuestionNeed Help Debugging Program Pin
Ryuk199022-May-09 11:10
Ryuk199022-May-09 11:10 
AnswerRe: Need Help Debugging Program Pin
BobInNJ22-May-09 11:26
BobInNJ22-May-09 11:26 
Under the rules of C++ all functions must be declared or defined before use. In the case of strcat,
you did not declare or define it. Under the old rules of C, if a function was not declared or
defined then the compiler assumed that it returned int. They way I would declare strcat, since it is a standard header file is to include the header file: string.h. Inside that header file there should be a declaration for strcat. There is a similar issue for strcpy.

To address the second issue, you might want to use a while loop. For example, your code might look
like the following:
<br />
bool validPassword = false;<br />
while ( validPassword == false ) {<br />
     read password<br />
     if password is correct then<br />
        validPassowrd = true;<br />
     else {<br />
        put up error message<br />
     }<br />
}<br />


Now, what I wrote about is not valid C++ but it should give you an idea of how you might restructure your program. I hope this helps. Feel free to ask a follow up question.

Bob
AnswerRe: Need Help Debugging Program Pin
Stuart Dootson22-May-09 11:33
professionalStuart Dootson22-May-09 11:33 
QuestionViewing Design Pin
Ryuk199022-May-09 10:20
Ryuk199022-May-09 10:20 
AnswerRe: Viewing Design Pin
Stuart Dootson22-May-09 10:34
professionalStuart Dootson22-May-09 10:34 
GeneralRe: Viewing Design Pin
Ryuk199022-May-09 11:13
Ryuk199022-May-09 11:13 
QuestionAlgoritm in C Pin
cstic22-May-09 9:47
cstic22-May-09 9:47 
AnswerRe: Algoritm in C Pin
Garth J Lancaster22-May-09 18:17
professionalGarth J Lancaster22-May-09 18:17 
QuestionGlobal Keyboard hook works for a few seconds... Pin
mcfonseca22-May-09 7:58
mcfonseca22-May-09 7:58 
Questionprogress bar created in the status bar turns up uncovered the pane Pin
HelloDan200922-May-09 7:27
HelloDan200922-May-09 7:27 
QuestionDoes Postmessage/SendMessage require a Message Map entries Pin
ForNow22-May-09 6:38
ForNow22-May-09 6:38 
AnswerRe: Does Postmessage/SendMessage require a Message Map entries Pin
led mike22-May-09 8:37
led mike22-May-09 8:37 
GeneralRe: Does Postmessage/SendMessage require a Message Map entries Pin
ForNow22-May-09 10:50
ForNow22-May-09 10:50 
GeneralRe: Does Postmessage/SendMessage require a Message Map entries Pin
«_Superman_»22-May-09 16:21
professional«_Superman_»22-May-09 16:21 
GeneralRe: Does Postmessage/SendMessage require a Message Map entries Pin
ForNow23-May-09 15:33
ForNow23-May-09 15:33 
QuestionGPS & GoogleMap matching Pin
yunpil22-May-09 5:17
yunpil22-May-09 5:17 
AnswerRe: GPS & GoogleMap matching Pin
Stuart Dootson22-May-09 6:33
professionalStuart Dootson22-May-09 6:33 
RantRe: GPS & GoogleMap matching Pin
Rajesh R Subramanian23-May-09 0:39
professionalRajesh R Subramanian23-May-09 0:39 
QuestionOutlook email(.Msg ) file problem in vista explorer.... Pin
onlyjaypatel22-May-09 3:33
onlyjaypatel22-May-09 3:33 

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.