If yes..in which library can it be found?
Thanks
A
If yes..in which library can it be found?
Thanks
A
remove() is stdio.h
unlink() is in unistd.h <-- Unix only
[edit] I presumed you were talking about deleting files?[/edit]
Last edited by Hammer; 05-16-2002 at 03:54 AM.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
he may have been askig about heaps:
Code:// Allocate on the heap char* Array = new char[99]; //Reclaimed with delete delete [] Array;
Originally posted by face_master
>he may have been askig about heaps:
>char* Array = new char[99];
That looks like c++ to me....
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
The same with me. In school, we were taught C and C++ at the same time. The only difference I know is some obvious things like printf/cout, scanf/cin, malloc/new, free/delete and structure/class...Originally posted by face_master
i just don't knoew anymore what C is and what C++ is !!
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
you got taught C++ at school?? Lucky bastard... I don't even think the computer teacher(s) at my school even know HTML! My computer teacher is some old guy who talks about the old computers that took up 20 rooms every lesson and if you havn't done your homework and you don't want him to come around and check it, you just ask him a question that he doesn't know the answer to like "Whats the difference between a Mac and a PC" and he babbles on about nothing for the rest of the lesson I learn/have learned everything I know from books (and a bit from this board )
Last edited by face_master; 05-16-2002 at 05:12 AM.
-"You lucky, lucky bastard" (Monty Python)Originally posted by face_master
you got taught C++ at school?? Lucky bastard... I don't even think the computer teacher(s) at my school even know HTML! My computer teacher is some old guy who talks about the old computers that took up 20 rooms every lesson and if you havn't done your homework and you don't want him to come around and check it, you just ask him a question that he doesn't know the answer to like "Whats the difference between a Mac and a PC" and he babbles on about nothing for the rest of the lesson I learn/have learned everything I know from books (and a bit from this board )
Anyway, congratulations to your own custom title (400+ posts)
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
They're only teaching us friggin JAVA... ughgshgh!!ddaqe2!
>If yes..in which library can it be found?
If you mean the delete operator in C++ which frees allocated memory then the corresponding C function is free(), found in stdlib.h.
Converted to C this would beCode:// Allocate on the heap char* Array = new char[99]; //Reclaimed with delete delete [] Array;
-PreludeCode:/* Allocate memory */ char *Array = malloc ( 99 * sizeof *Array ); /* Reclaimed with free */ free ( Array );
My best code is written with the delete key.
is sizeof a function or an operator? either way it seems to take in weird input, something that no other function can do.
From the good book (K&R that is)Originally posted by ygfperson
is sizeof a function or an operator? either way it seems to take in weird input, something that no other function can do.
The sizeof operator yields the number of bytes required to store an object of the type of its operand......
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Yeah. You wouldn't want to use Java. I mean really, then you don't get to use the arrow operator at all!Originally posted by -leech-
They're only teaching us friggin JAVA... ughgshgh!!ddaqe2!
I like Java. For the most part, Java is like C or C++. They have a very similar syntax. If you know one, it's not too hard to be able to read the code of another. Generally speaking anyway.
Quzah.
Hope is the first step on the road to disappointment.