Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralString error again! Help plz Pin
tongc15-May-02 4:39
tongc15-May-02 4:39 
GeneralRe: String error again! Help plz Pin
tongc15-May-02 5:07
tongc15-May-02 5:07 
GeneralRe: String error again! Help plz Pin
tongc15-May-02 6:23
tongc15-May-02 6:23 
GeneralRe: String error again! Help plz Pin
Jonathan Craig15-May-02 7:24
Jonathan Craig15-May-02 7:24 
GeneralRe: String error again! Help plz Pin
Joaquín M López Muñoz15-May-02 5:21
Joaquín M López Muñoz15-May-02 5:21 
GeneralRe: String error again! Help plz Pin
tongc15-May-02 6:21
tongc15-May-02 6:21 
GeneralMemory compareing with char's Pin
SilverShalkin15-May-02 4:07
SilverShalkin15-May-02 4:07 
GeneralRe: Memory compareing with char's Pin
Jason Henderson15-May-02 4:41
Jason Henderson15-May-02 4:41 
SilverShalkin wrote:
char Names[21];// for 20 names.

Names is not 20 strings, its 20 characters. Yes, you could use char Names[21][32].

SilverShalkin wrote:
and if that is the right code to insert, how would i set M_Name to = to 32 bytes of memory without declaring:

char *M_Name[32];


Try this:

char Names[21][32];

bool Name::SetName(char* NName)
{

if(!NName)//checking input
{
return false;
}

strncpy(Names[NN], NName, 32);
NN++;

return true;
}


Like it or not, I'm right.
GeneralRe: Memory compareing with char's Pin
SilverShalkin15-May-02 4:55
SilverShalkin15-May-02 4:55 
GeneralRe: Memory compareing with char's Pin
SilverShalkin15-May-02 5:02
SilverShalkin15-May-02 5:02 
GeneralRe: Memory compareing with char's Pin
Jason Henderson15-May-02 5:20
Jason Henderson15-May-02 5:20 
GeneralRe: Memory compareing with char's Pin
Jason Henderson15-May-02 5:22
Jason Henderson15-May-02 5:22 
GeneralRe: Memory compareing with char's Pin
Joaquín M López Muñoz15-May-02 5:24
Joaquín M López Muñoz15-May-02 5:24 
GeneralRe: Memory compareing with char's Pin
SilverShalkin15-May-02 8:29
SilverShalkin15-May-02 8:29 
GeneralRe: Memory compareing with char's Pin
Joaquín M López Muñoz15-May-02 9:03
Joaquín M López Muñoz15-May-02 9:03 
GeneralProb. to catch the EOF ?! Pin
Fred D.15-May-02 4:02
Fred D.15-May-02 4:02 
GeneralRe: Prob. to catch the EOF ?! Pin
Jeremy Falcon15-May-02 5:22
professionalJeremy Falcon15-May-02 5:22 
GeneralRe: Prob. to catch the EOF ?! Pin
Joaquín M López Muñoz15-May-02 5:17
Joaquín M López Muñoz15-May-02 5:17 
GeneralMultithreading in C++ without MFC Pin
15-May-02 3:19
suss15-May-02 3:19 
GeneralRe: Multithreading in C++ without MFC Pin
Prem Kumar15-May-02 3:45
Prem Kumar15-May-02 3:45 
GeneralRe: Multithreading in C++ without MFC Pin
Nish Nishant15-May-02 3:51
sitebuilderNish Nishant15-May-02 3:51 
GeneralRe: Multithreading in C++ without MFC Pin
Tim Smith15-May-02 4:45
Tim Smith15-May-02 4:45 
QuestionHow can I get and set the keyboard state? Pin
Edwin Geng15-May-02 2:11
Edwin Geng15-May-02 2:11 
AnswerRe: How can I get and set the keyboard state? Pin
Chris Losinger15-May-02 6:46
professionalChris Losinger15-May-02 6:46 
GeneralRe: How can I get and set the keyboard state? Pin
Edwin Geng16-May-02 6:20
Edwin Geng16-May-02 6:20 

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.