Click here to Skip to main content
15,886,422 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
QuestionCommand object execute parameters [modified] Pin
vital_parsley200022-May-09 2:56
vital_parsley200022-May-09 2:56 

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.