a fast and easy c reference guide is what i needed :)
nice work :D
Type: Posts; User: delphi
a fast and easy c reference guide is what i needed :)
nice work :D
Oh my god !!!
Really Fast Reply :D
I'm so stupid.. I didn't know about that precedence :(
Anyway, Thank you very much :) Now it woks !
I've del.icio.used your website :D
Hi All.. I cannot find the mistake in this code.
#include <stdio.h>
#include <stdlib.h>
void create_vect (int** v) {
*v = (int *) malloc(2 * sizeof(int));
*v[0] = *v[1] = 85;
}
Thx Ancient..
Hi all...
I know how to insert a node into a linked list using 1 criterion
But if, for example, i have to insert a node using 2 criteria like, e.g., surname and name, so the list will be...
hehe lol :P
Actually i've already read that faq some months ago but i didn't remember ..
hehe sorry :P
Ahh..... ok :)
But... so it works only because ctrl Z (windows) can be contained in a char
I mean.. if i run it on unix, where EOF is return ctrl Z, it should'n work.. right ?
actually u continued to say that the code is wrong.. can u write the best code ever for this kind of problem pls ? :rolleyes:
Ehm... what's wrong with char c ?;
do u want an unsigned char ? :O
char c;
while ((c = fgetc(f))!=EOF){
if (c=='\n')
count++;
Since i'm noob.. could u write the best code in your opinion :O
well.. ok.. feof shouldn't be used.. then i can use this
char c;
while ((c = fgetc(f))!=EOF){
count += (c == '\n');
well.. yes.. i already know how my file is formatted (one string per line)... however it's better to code a general case, which will work for every case
...
Hi all...
How can I get the numer of lines in a file ?
A solution is:
char string[20
int counter = 0;
f = fopen ("blabla.txt", "r");
thank you so much all :)
Thx :)
I've tried this
while(!kbhit('c')) printf( "u didn't press c"); and it works :)
Does it work also for a combo like CTRL + Z ? If Yes, how ? :D
sorry very much :D
Windows XP and Dev-C++(Mingw compiler)
How to know when a key from the keyboard is pressed ?
(PS: i cannot use the return key, just ONE key)
Thx in advance