Click here to Skip to main content
15,896,402 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: NMAKE Error Pin
David Crow5-Jul-11 2:55
David Crow5-Jul-11 2:55 
Questionconverting chinese .rc file to english .rc file Pin
Sakhalean2-Jul-11 3:44
Sakhalean2-Jul-11 3:44 
AnswerRe: converting chinese .rc file to english .rc file Pin
«_Superman_»2-Jul-11 10:24
professional«_Superman_»2-Jul-11 10:24 
GeneralRe: converting chinese .rc file to english .rc file Pin
Albert Holguin3-Jul-11 7:29
professionalAlbert Holguin3-Jul-11 7:29 
AnswerRe: converting chinese .rc file to english .rc file Pin
Dr.Walt Fair, PE2-Jul-11 19:17
professionalDr.Walt Fair, PE2-Jul-11 19:17 
QuestionIs this possible String Encryptin result contains only alphanumric value using Base64. Pin
Le@rner2-Jul-11 2:05
Le@rner2-Jul-11 2:05 
AnswerRe: Is this possible String Encryptin result contains only alphanumric value using Base64. Pin
Philippe Mori2-Jul-11 12:30
Philippe Mori2-Jul-11 12:30 
AnswerRe: Is this possible String Encryptin result contains only alphanumric value using Base64. Pin
Dr.Walt Fair, PE2-Jul-11 18:37
professionalDr.Walt Fair, PE2-Jul-11 18:37 
AnswerRe: Is this possible String Encryptin result contains only alphanumric value using Base64. Pin
Randor 4-Jul-11 3:34
professional Randor 4-Jul-11 3:34 
AnswerRe: Is this possible String Encryptin result contains only alphanumric value using Base64. Pin
jschell4-Jul-11 6:53
jschell4-Jul-11 6:53 
QuestionRandom string generation not working fine? [modified] Pin
Le@rner1-Jul-11 23:40
Le@rner1-Jul-11 23:40 
AnswerRe: Random string generation not working fine? Pin
Richard MacCutchan2-Jul-11 0:47
mveRichard MacCutchan2-Jul-11 0:47 
GeneralRe: Random string generation not working fine? Pin
Le@rner2-Jul-11 1:23
Le@rner2-Jul-11 1:23 
GeneralRe: Random string generation not working fine? Pin
Richard MacCutchan2-Jul-11 2:35
mveRichard MacCutchan2-Jul-11 2:35 
GeneralRe: Random string generation not working fine? Pin
Le@rner3-Jul-11 20:57
Le@rner3-Jul-11 20:57 
Questiontrying to solve exam question and getting unreasonable length code, can it be shorter? Pin
atikot1-Jul-11 9:31
atikot1-Jul-11 9:31 
AnswerRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
User 74293381-Jul-11 10:47
professionalUser 74293381-Jul-11 10:47 
GeneralRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
atikot1-Jul-11 10:56
atikot1-Jul-11 10:56 
GeneralRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
User 74293381-Jul-11 11:03
professionalUser 74293381-Jul-11 11:03 
GeneralRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
atikot1-Jul-11 11:04
atikot1-Jul-11 11:04 
GeneralRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
Philippe Mori1-Jul-11 12:35
Philippe Mori1-Jul-11 12:35 
AnswerRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
Philippe Mori1-Jul-11 12:20
Philippe Mori1-Jul-11 12:20 
AnswerRe: trying to solve exam question and getting unreasonable length code, can it be shorter? [modified] Pin
Alain Rist3-Jul-11 23:54
Alain Rist3-Jul-11 23:54 
GeneralRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
Stefan_Lang4-Jul-11 0:37
Stefan_Lang4-Jul-11 0:37 
Two things:

1. If applied to a very long string (e. g. a string containing an entire article or book) the result string becomes unreasonably large. You might want to determine the minimum between strlen(str) and 256 rather than just strlen(str). Also, since you're printing the chars as ints, you'll need at least 6 bytes to store the result of "%c %d;" from sprintf() since the first value can be up to 3 digits long.

2. You're printing the characters as integers, against the specification. (note: you can safely do so since you won't count any nonprintable characters that might meddle with your output). Printing chars as chars will also shorten the output string (see above)
GeneralRe: trying to solve exam question and getting unreasonable length code, can it be shorter? Pin
Alain Rist4-Jul-11 5:01
Alain Rist4-Jul-11 5:01 

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.