Click here to Skip to main content
15,889,345 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to draw a filled triangle Pin
Christian Graus28-Mar-04 16:27
protectorChristian Graus28-Mar-04 16:27 
GeneralRe: How to draw a filled triangle Pin
vamsy krishna28-Mar-04 16:49
vamsy krishna28-Mar-04 16:49 
GeneralRe: How to draw a filled triangle Pin
Christian Graus28-Mar-04 16:52
protectorChristian Graus28-Mar-04 16:52 
GeneralRe: How to draw a filled triangle Pin
Rick York28-Mar-04 20:06
mveRick York28-Mar-04 20:06 
GeneralRe: How to draw a filled triangle Pin
Steve S29-Mar-04 0:36
Steve S29-Mar-04 0:36 
GeneralRe: How to draw a filled triangle Pin
Antony M Kancidrowski29-Mar-04 2:26
Antony M Kancidrowski29-Mar-04 2:26 
GeneralRe: How to draw a filled triangle Pin
Christian Graus29-Mar-04 9:55
protectorChristian Graus29-Mar-04 9:55 
Generalending strings Pin
kfaday28-Mar-04 15:39
kfaday28-Mar-04 15:39 
I've got this code, which gets words from a file into a char matrix([20][50]).
But as it's a 50 long string, what i get for example is this:

"hello (lots of unwanted spaces) "

so i've written some code to put 0 (\0) when the first space starts (' '), but it doesn't do the job. I'd want the string to be like this:

"hello"

so i can compare it, but it stays like this:

"hello (lots of unwanted spaces) "

Here's the code? what could i be doing wrong?

while ((palabras[j][0]!='\n') && (!(feof(archini))))

{
j++;
fgets(palabras[j],50,archini);
}


for (k=0;k<j;k++)
{
i=0;
while (palabras[k][i]!=' ')
{
i++;
}
palabras[k][i]=0;
}


Thanks!!!
GeneralRe: ending strings Pin
Christian Graus28-Mar-04 16:28
protectorChristian Graus28-Mar-04 16:28 
GeneralRecursion in Visual C++ Pin
Iceberg7628-Mar-04 15:34
Iceberg7628-Mar-04 15:34 
GeneralRe: Recursion in Visual C++ Pin
kfaday28-Mar-04 15:45
kfaday28-Mar-04 15:45 
GeneralRe: Recursion in Visual C++ Pin
Steve S29-Mar-04 0:38
Steve S29-Mar-04 0:38 
GeneralRe: Recursion in Visual C++ Pin
oOomen29-Mar-04 5:36
oOomen29-Mar-04 5:36 
GeneralRe: Recursion in Visual C++ Pin
David Crow29-Mar-04 3:27
David Crow29-Mar-04 3:27 
GeneralEnumerating dialog controls Pin
codecharmer28-Mar-04 14:38
codecharmer28-Mar-04 14:38 
GeneralRe: Enumerating dialog controls Pin
wb28-Mar-04 18:29
wb28-Mar-04 18:29 
GeneralRe: Enumerating dialog controls Pin
codecharmer29-Mar-04 3:43
codecharmer29-Mar-04 3:43 
GeneralHelp with to resize some frames Pin
Victor Nikol28-Mar-04 14:37
Victor Nikol28-Mar-04 14:37 
GeneralRe: Help with to resize some frames Pin
Christian Graus28-Mar-04 16:53
protectorChristian Graus28-Mar-04 16:53 
QuestionThe difference between debug and release version? Pin
Indrawati28-Mar-04 14:33
Indrawati28-Mar-04 14:33 
AnswerRe: The difference between debug and release version? Pin
Tim Smith28-Mar-04 14:38
Tim Smith28-Mar-04 14:38 
GeneralBinary file processing Pin
LudaLuda28-Mar-04 13:37
LudaLuda28-Mar-04 13:37 
GeneralRe: Binary file processing Pin
Christian Graus28-Mar-04 14:17
protectorChristian Graus28-Mar-04 14:17 
GeneralRe: Binary file processing Pin
LudaLuda28-Mar-04 14:45
LudaLuda28-Mar-04 14:45 
GeneralRe: Binary file processing Pin
Christian Graus28-Mar-04 14:47
protectorChristian Graus28-Mar-04 14:47 

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.