Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionExecuting Code on C++ API Exit Pin
turkmeistr120-Apr-09 5:53
turkmeistr120-Apr-09 5:53 
QuestionRe: Executing Code on C++ API Exit Pin
David Crow20-Apr-09 5:57
David Crow20-Apr-09 5:57 
AnswerRe: Executing Code on C++ API Exit Pin
turkmeistr120-Apr-09 6:23
turkmeistr120-Apr-09 6:23 
GeneralRe: Executing Code on C++ API Exit Pin
David Crow20-Apr-09 8:07
David Crow20-Apr-09 8:07 
GeneralRe: Executing Code on C++ API Exit Pin
turkmeistr120-Apr-09 9:07
turkmeistr120-Apr-09 9:07 
Questionchar array issues Pin
gamefreak229120-Apr-09 5:07
gamefreak229120-Apr-09 5:07 
QuestionRe: char array issues Pin
David Crow20-Apr-09 5:15
David Crow20-Apr-09 5:15 
AnswerRe: char array issues Pin
gamefreak229120-Apr-09 6:02
gamefreak229120-Apr-09 6:02 
no, i have not considered the others, because it took long enough to get the ascii values going.

DavidCrow wrote:
if(password1[q]='p','a','s','s','w','o','r','d','\0'){goto end1;}


yes, that takes you to the end which prints that the password works.

DavidCrow wrote:
}while(x=1);


okay, im looking at it. It does exactly what it is supposed to, that bit of code is only in the program at this point for debugging purposes, it allows the user to keep trying to get the correct password.

As for i+1, and i-1.. i++ and i-- was not working properly, I changed them to +1 and -i, then had them print to make sure they were working.

And of course it compiles. the reason why "for(q=0;q<i;q++){cout><< password1[q];}" is in the code is because password1[i] allows you to enter 25 characters max, and if you only enter 5 characters, the rest of them are filled in with null terminators. However, I don't want my password to be full of null terminators, so if i input 5 characters, i is currently 5, so i have q=i; then i fills out with the rest of the array with null terminators. Then the program prints password1[q] from 0-5, which is really like printing password1[0], password1[1], password1[2], password1[3], password1[4], and password1[5]. I previously had the program print the entire array however it was over lapping on multiple tries, so now it only prints the needed numbers.

Thanks again for the help
GeneralRe: char array issues PinPopular
Maximilien20-Apr-09 6:51
Maximilien20-Apr-09 6:51 
AnswerRe: char array issues Pin
CPallini20-Apr-09 10:51
mveCPallini20-Apr-09 10:51 
AnswerRe: char array issues Pin
Stuart Dootson20-Apr-09 19:41
professionalStuart Dootson20-Apr-09 19:41 
Questionmanipulating Windows' "Open With" function Pin
kouddy20-Apr-09 4:56
kouddy20-Apr-09 4:56 
QuestionRe: manipulating Windows' "Open With" function Pin
David Crow20-Apr-09 5:10
David Crow20-Apr-09 5:10 
Questionis this posible can you show me how it is done Pin
Lanstar20-Apr-09 3:32
Lanstar20-Apr-09 3:32 
AnswerRe: is this posible can you show me how it is done Pin
Rajesh R Subramanian20-Apr-09 3:35
professionalRajesh R Subramanian20-Apr-09 3:35 
GeneralRe: is this posible can you show me how it is done Pin
Tony Pottier20-Apr-09 3:53
Tony Pottier20-Apr-09 3:53 
GeneralRe: is this posible can you show me how it is done Pin
Rajesh R Subramanian20-Apr-09 4:06
professionalRajesh R Subramanian20-Apr-09 4:06 
QuestionWriting data to the sound card Pin
Tony Pottier20-Apr-09 2:39
Tony Pottier20-Apr-09 2:39 
AnswerRe: Writing data to the sound card Pin
CPallini20-Apr-09 2:53
mveCPallini20-Apr-09 2:53 
GeneralRe: Writing data to the sound card Pin
Tony Pottier20-Apr-09 3:12
Tony Pottier20-Apr-09 3:12 
GeneralRe: Writing data to the sound card Pin
CPallini20-Apr-09 3:16
mveCPallini20-Apr-09 3:16 
GeneralRe: Writing data to the sound card Pin
Tony Pottier20-Apr-09 3:34
Tony Pottier20-Apr-09 3:34 
QuestionRe: Writing data to the sound card Pin
Divyang Mithaiwala20-Apr-09 3:22
Divyang Mithaiwala20-Apr-09 3:22 
AnswerRe: Writing data to the sound card Pin
Tony Pottier20-Apr-09 3:35
Tony Pottier20-Apr-09 3:35 
GeneralRe: Writing data to the sound card Pin
molesworth20-Apr-09 5:44
molesworth20-Apr-09 5:44 

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.