Click here to Skip to main content
15,892,809 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: execution time of function increases Pin
Rajesh R Subramanian22-May-09 21:50
professionalRajesh R Subramanian22-May-09 21:50 
AnswerRe: execution time of function increases Pin
Shivanand Gupta22-May-09 22:07
Shivanand Gupta22-May-09 22:07 
AnswerRe: execution time of function increases Pin
Rob 222-May-09 23:01
Rob 222-May-09 23:01 
AnswerRe: execution time of function increases Pin
Hamid_RT22-May-09 23:27
Hamid_RT22-May-09 23:27 
GeneralRe: execution time of function increases Pin
cute_friend707722-May-09 23:35
cute_friend707722-May-09 23:35 
GeneralRe: execution time of function increases Pin
Hamid_RT23-May-09 1:28
Hamid_RT23-May-09 1:28 
GeneralRe: execution time of function increases Pin
ThatsAlok24-May-09 18:38
ThatsAlok24-May-09 18:38 
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 
AnswerRe: Need Help Debugging Program Pin
Stuart Dootson22-May-09 11:33
professionalStuart Dootson22-May-09 11:33 
Ryuk1990 wrote:
1.) Why do I get these warnings?
Warning 1 warning C4996: 'strcat' was declared deprecated f:\testing\testing\testing.cpp 22
Warning 2 warning C4996: 'strcpy' was declared deprecated f:\testing\testing\testing.cpp 26


Because Microsoft decided they were unsafe and you should use strcat_s[^] and strcpy_s[^] instead. See this page[^] for even more detail.


Ryuk1990 wrote:
2.) You have to enter a password in the beginning of the program in order to access the store. I have it set up so that it tells the user that the password is incorrect. It used to display that if the user did indeed put in the wrong password but it would still let the user move onto the store. So to stop that, I added the line "return 0;" in the else condition. The problem is that it now exits out of the program without even letting the user see that the password was incorrect. What would be a better solution?


Replace

strcpy(Password,"That's not the correct password!\n");


with

cerr << "That's not the correct password!\n";


I'd also replace this

strcat(Password," is the correct password!\n");


with

cout << Password << " is the correct password!\n";


and get rid of this

cout << Password;



Ryuk1990 wrote:
3.) I've noticed that in the first question if my if condition is true, it still moves onto my switch method question. I want it to stop.


Put a return 0; after this line:

cout << "Get out!\n";}


Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

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 

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.