C, C++ Function Referance?
Hello and Good day to ya'll :)
I have been looking for a website for C, C++ that has a function referance, similar to the php function referance. I have tried searching on google, but have not had any luck.
Any help would be appreciated.
this is not to be answered in one sentence ;)
ok, if you talk about C, you should correctly say "Ansi C" since there is several C languages. "Ansi C" is a well-defined language and the only reference that i have is the Kernighan and Ritchie :( but search on google. it should be on the Žnet...
but when you want to do more than only console / server / daemon programming, youŽll need libraries. then you should get the function list and description with them.
if you talk about microsoft visual c or another C for windows programming, go to http://msdn.microsoft.com
for linux, you have section 2 of the man pages (if installed) :)
Thanks for the reply. I was able to figure it out. Now the only problem I seem to have is copying one variable to another.
char dir, buffer[_MAX_PATH];
dir = buffer;
Both give me a "cannot convert from 'char *' to 'char' This conversion requires a reinterpret_cast, a C-style cast or function-style cast" error. I guess I am looking in the wrong spot, because I can not find anything about this in the help.
char dir, buffer[_MAX_PATH];
Any help here would be nice.
In the first case, you're trying to copy a character pointer into a single character variable (the first element of an array is actually a pointer to the address of the array). You need to make dir a char pointer.
In the second case, you need to make dir a character buffer like buffer. You can do that in two ways:
char *dir, buffer[_MAX_PATH];
char *dir = new char[_MAX_PATH];
// Remember to delete the memory that you created when you're done.
delete  dir;
"Me fail English? That's unpossible!"
Thanks for the reply. I guess I am just used to dealing with varialbles like in php.
yes, i noticed the fact that pHP variables are very weakly typed, unlike the "char OR DIE!" type of stuff you see in C/C++/ and especially java.
You are going to have to get used to the strict type-checking of C and ween yourself off of the devil-may-care-about-variables PHP.
June 17th, 2002, 03:50 AM
the question is there
OK pal I need standard B]c and c++[[/B] function as like we have for PHP. I bet no one has seen a manula like PHP. I love php not becouse it is easy b'coz it is easy to find out than to look at definations and wonder what they meant. I have DevC++ and code using Dev C++ and MSVC is expensive thing to get So Can I get some light where is a manual for Standard/ISO/Ansii(/ASCII/Blue Sky what ever it is ;) C and C++ . It will be also apprecaited if some one suggest a book which is like C or C++ manual.
June 17th, 2002, 04:01 PM
Imho "the" C-Manual is the "Kernighan and Ritchie - Programming C". These two guys "invented" C (and unix i think).
June 17th, 2002, 07:03 PM
... and the "standard" C++ book is "The C++ Programming Language", written by Bjarne Stroustrup, the creator of C++.
"Me fail English? That's unpossible!"
June 19th, 2002, 08:27 AM
ooops I am wrong again. I have the Tandard DenRit... C Book but that is not like php manual. I am looking a thing as acomaptible to PHP manual. You know it then let me know.
Oh plezzzzzzzzzz Help meeeeee
June 19th, 2002, 09:19 AM
I really rather doubt that you will find a book out there that is built like the php manual.
The reason behind this? Well, there is only 1 place to get php, so all functionality can be documented via that company. Now C/C++ is a different story. As far as the base language, it is basically all the same for each language, and is rather small considering. The vast majority of C/C++ complexity comes from its libraries. Any time you #include <file.h> you are including a library/api. These vary from operating system and compiler type. You wont find some functions in VC++ that you will find in the Borland version. Same thing with gcc. You will find plenty of reference manuals that will explain in depth various versions of C/C++, but most manuals try to explain as close to the ansi standard as possible.
The books recommended by M.Hirsch and jonsagara are probably two of the best out there.
June 20th, 2002, 05:43 AM
So what is I am supposed to do?
Hey thanx for all this.
June 20th, 2002, 08:38 AM
Well, I can't comment on DevC++, but TC++ isn't really used unless you are doing dos/16 bit apps. That is what I took in school, but it is outdated.
Of the top compilers out there, the most popular are Borland, gcc and VC++. Watcom is also making a comback and bloodshed is also decent but finding acurate information on those are a little harder.
June 21st, 2002, 08:28 AM
I am a student
Basically I do C/C++ to make sure i do not get fail in My Level 'A' exams. MS VC++ is as I said is out of reach for a poor guy like me.. Even getting Licensed TC++, which is outdated as you siad, is hard. The one I used was in 1999 at some institute. I will really love to know something even if a book exists that just summarizes the functions of all ANSI C or the very standard C++. The one which i figured out is a 18US$ manual which ISO commetti provides for download. I ahd never seen a US$ as I live in India. I am working and studying along. This is hard way to do things when you sowrk for 14 hours on html and php and then tudy C/C++ or Computer Graphics without anybody explaining what the hell Bresenham line drawing algorithm is.
DevC++ is a help for poor guys like me. As being a fool and I am not sure how the GCC is used on Lniux. (I do have Linux. )
June 21st, 2002, 08:57 AM
Well, the users guide that came with TC++ is a pretty decent reference. It was made by boreland.
Since you are a student you may want to check into getting student licenses for these packages. Most major tools that are for sale offer student licenses at a discount.
Take for instance the Visual Studio 6. I got it from a college bookstore when I was persuing my AAS for under $200 US, which is a remarkable drop in price over the standard retail.
As far as the gcc, I would recomment that you take a look at some of the makefiles that are in the source directory and build programs to fit like this and then you just type make in that directory, but for a small sample on compiling a simple script, try something like this:
gcc -g helloworld.c
gcc -o helloworld helloworld.o
The first line creates the object file helloworld.o
The second line creates the executable helloworld from the object helloworld.o
Now, this is just a sample, usually compile lines are much more complex than this considering that you can build with or without debug code, include libraries and other options. Check out the man page for gcc.