|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. Eclipce
__________________
Baptism By The Scriptures | Fifty Objections to Baptism Answered | HTML Bible | God's Salvation Plan Lifetime Residual Income |
|
#2
|
|||
|
|||
|
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) ![]()
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
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.
Code:
char dir, buffer[_MAX_PATH]; getcwd(buffer, _MAX_PATH); dir = buffer; or Code:
char dir, buffer[_MAX_PATH]; getcwd(buffer, _MAX_PATH); strcpy(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. Any help here would be nice. Eclipce |
|
#4
|
||||
|
||||
|
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.
Code:
char *dir, buffer[_MAX_PATH]; ... In the second case, you need to make dir a character buffer like buffer. You can do that in two ways: Code:
char *dir = new char[_MAX_PATH]; ... // Remember to delete the memory that you created when you're done. delete [] dir; or Code:
char dir[_MAX_PATH]; ...
__________________
Jon Sagara "Me fail English? That's unpossible!" |
|
#5
|
|||
|
|||
|
Thanks for the reply. I guess I am just used to dealing with varialbles like in php.
Eclipce |
|
#6
|
|||
|
|||
|
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. good luck. |
|
#7
|
||||
|
||||
|
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.
__________________
Kumar Chetan ----- 7+ Yrs of PHP/MySQL/JS/CSS/HTML/XHTML _SelfProcclaimedGuru To err is human. To blame your computer for your mistakes is even more human, it is downright natural. |
|
#8
|
|||
|
|||
|
Imho "the" C-Manual is the "Kernighan and Ritchie - Programming C". These two guys "invented" C (and unix i think).
|
|
#9
|
||||
|
||||
|
... and the "standard" C++ book is "The C++ Programming Language", written by Bjarne Stroustrup, the creator of C++.
|
|
#10
|
||||
|
||||
|
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 |
|
#11
|
||||
|
||||
|
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. |
|
#12
|
||||
|
||||
|
I am a fool. I knew that PHP is centralised at php.net but forget that c/c++ are not. Yes it is true that I will never find anything like this. we have a refrence for php/perl/javascript/html/vb/asp/.. but none for C/C++ . Every one know that C/C++ is the ultimate thing in computing. OK I will get those books. some one told me I should get manual for DevC++ if I use it. but they don't have any. also the help with TC++ is not that upto the mark(Means that fools like me can't understand it.)
Hey thanx for all this. |
|
#13
|
||||
|
||||
|
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. |
|
#14
|
||||
|
||||
|
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. ) |
|
#15
|
||||
|
||||
|
Well, the users guide that came with TC++ is a pretty decent reference. It was made by boreland. |