Thx for your help. But it just works this way:
#if (!defined ID_1 || !defined ID_2)
mfg
Type: Posts; User: mabuhay
Thx for your help. But it just works this way:
#if (!defined ID_1 || !defined ID_2)
mfg
Is it possible to ORe some identifiers with #ifdef or #ifndef?
This does not work:
#ifndef ID_1 || ID_2 || ....
I'm now using a **. It's the easiest way I think.
Thx for your help
I'm not programming for a PC, I'm programming with TIGC-C for my calculator. So there's a way to add a user file extension to the file or to archive the file, and for that I have to close the file...
hmmyes, but I have to return error numbers as int... So the easiest way would be the FILE **f. Or is there another solution?
thx @swoopy
I declared
FILE *f = NULL;
in the main-function. Then I call a function, where I close the file f and open it again. I thought, the function prototype can look like this:
void my_function(FILE...
Thanks for all your answers. It's running :)
Jup, that works.
Now I have another problem. In the function, I have to copy the data from one file to another (for example to add a block of data in the middle of the file). For that, I need a...
It will be a binary file. Thx for your answer, I will try it out...
mfg
Hi
I have written a function where I can save a structure in a file. So the prototype looks like this:
void SaveStructure(FILE *f, STRUCTURE *structure);
The structure looks for example like...
For german users:
C von A bis Z
All basics you have to know about C programming. With sourcecode-examples and lots of useful graphics.
also available as Open Book: www.pronix.de
There's...
mkee, now i get it (i should start to work also with an other OS) ;)
thx
first, learning how to use structures, then a little database, where you can store for example last name, first name and age and where you can save them in a file an load them... :cool:
oh, i thought it is, because in the FAQ of system("pause") is written "A poor-mans method of using system(), OS specific."
Or why else should'nt you use system("pause")? I know it's not that good...
but system() is OS specific...
why are you using the red ones?
#include <stdio.h>
int main()
{
{printf("hello");
getchar();
}
}
if you want just to show the content of your file on the screen, just use one fgets. If the nuber will never be longer than 9 chars, you can still use your check "if(strlen..." on each line you read....
what I can see is, you first have to declare all the variables, and then you can use things like loops and so on.
In your function password() you first declare some variables and char* name[6],...
now I opened a forum, with an english section.-> Forum
Feel free to post all your questions about the homepage there. I will answer as good as i can.
OK, now i got it! If ther are too much characters in the input buffer, the maximal number of characters will be read and the rest will stay in the stdin and if the next scanf() is called, it will...
Yes, but if I use fgets() I stored my input in a variable but something is still in the input. Or why does it jups over if I use fgets() in the same code again?
I don't want to use scanf(),...
I'm just too lazy to write the parameters... ;)
but, does someone had ever problems using fflush(stdin)?
i think it is known, if you use fgets(some_parameters*g*), that you have to empty the...
what means "fflush() is illegal"? you shouldn't use it anymore?
I normally use fflush(stdin) after fgets()...
hmmyes, I still thought about a translaion, but it would be to hard to translate everything on my own.
Today i added some descriptions of the functions. I think, if you know something about...
yessssssssss, it works!
if someone needs ini functions to store data in a *.ini-file like settings etc. here you can download my library (C-Funktionen -> ini_* -> my_ini.zip). Also a demo-programm...