|
Hi!
I'm a begginer and i have a small question. In the following while loop, it seems that it doesn't find the end of archini, and it prints "agarrar" (archini's last line) for ever. It's an infinite loop. What am i doing wrong? Thanks!!
while (~(feof(archini)))
{
fgets(temp,15,archini);
printf ("%s",temp);
}
archini:
[verbos]
salir
explorar
agarrar //end of file
program output:
agarrar
agarrar
agarrar
.
.
.
|
|
|
|
|
Try this instead
while (!(feof(archini)))
{
fgets(temp,15,archini);
printf ("%s",temp);
}
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
|
Why are you using the bitwise NOT operator? It's out of context here. How about this instead:
while (! feof(...))
{
...
}
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
David how is this written in code?
|
|
|
|
|
Kids, just say no!
--
Ich bin der böse Mann von Schweden.
|
|
|
|
|
while(!success_writing_your_own_code())
{
int retval;
retval = try_solving();
if(!retval)
{
<a href="http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=771680&df=100&app=50&msg=771680#xx771439xx">refer_david_crow_program_spec();
</a>
}
}
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
I would do it like so:
printf("this");
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Hello,
does anybody know how to retrieve the icons for the installed programs, the way Windows Add/Remove programs does?
Thanks in advance!
|
|
|
|
|
How about ExtractIcon() ?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I've tried with extract icon, it doesen't work for all the apps.
|
|
|
|
|
or SHGetFileInfo(...)
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
This should be the answer!!! Thank you all!
|
|
|
|
|
Try it before you conclude, and let me know wheather it worked ?
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
I'm working on windowless control and came up to a problem of geting the parent form on which I planted my control. Is this posible to obtain and if it is how?
Fear not the dark within this night
Beneath the sky of deadly light
Of raging fire seen from afar
The fear inside of who you are
|
|
|
|
|
There is no such thing as parent form, perent window yes...
you can get it if you use
GetParent(...);
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Hi,
How can I get the Open File Dialog Box .I use MFC and MVC++ 6.0.
Thanks.
Deepak Samuel.
|
|
|
|
|
Construct a CFileDialog object.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
How can we add the file names in a directory to a combobox ?
Thanks,
Deepak Samuel
|
|
|
|
|
Use the AddString() method. If you are not using MFC, then send the control a CB_ADDSTRING message.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
If you want to get the files also you need to use FindFirstFile() and FindNextFile() .
A quick example of FindFirstFile straight from MSDN
#define _WIN32_WINNT 0x0400<br />
<br />
#include <windows.h><br />
#include <stdio.h><br />
<br />
int main(int argc, char *argv[])<br />
{<br />
WIN32_FIND_DATA FindFileData;<br />
HANDLE hFind;<br />
<br />
printf ("Target file is %s.\n", argv[1]);<br />
hFind = FindFirstFile(argv[1], &FindFileData);<br />
if (hFind == INVALID_HANDLE_VALUE) <br />
{<br />
printf ("Invalid File Handle. GetLastError reports %d\n", GetLastError ());<br />
return (0);<br />
} <br />
else <br />
{<br />
printf ("The first file found is %s\n", FindFileData.cFileName);<br />
FindClose(hFind);<br />
return (1);<br />
}<br />
}
Ant.
|
|
|
|
|
Of course, but since the verb in the original post was "add", it only made sense that the combobox was the subject.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Sorry David my post was not meant as a critisism of yours.
Since English is quite ambiguous I thought I would fill the possible missing part
Ant.
|
|
|
|
|
is there any library which i can use to make a flow chart in VC++
|
|
|
|
|
I'm trying to put together a program to simulate the weakest link scorinbg system. The player is shown a random number and has to guess whether the next random number will be higher or lower than the current one.
For the random number I think I use rand() and then if statments to check the answer.
if edit1 < than edit2 ->then counter move up
could anybody bring this more into focus for me. I design my uml but having trouble with the coding.
nicolas
|
|
|
|