C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 16th, 2002, 12:10 PM
Eclipce Eclipce is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2000
Posts: 763 Eclipce User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 29 m 25 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old May 16th, 2002, 12:53 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
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.

Reply With Quote
  #3  
Old May 17th, 2002, 12:01 PM
Eclipce Eclipce is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2000
Posts: 763 Eclipce User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 29 m 25 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old May 17th, 2002, 12:15 PM
jonsagara's Avatar
jonsagara jonsagara is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: USA
Posts: 286 jonsagara User rank is Private First Class (20 - 50 Reputation Level)jonsagara User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 m 23 sec
Reputation Power: 7
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!"

Reply With Quote
  #5  
Old May 17th, 2002, 12:36 PM
Eclipce Eclipce is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2000
Posts: 763 Eclipce User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 5 h 29 m 25 sec
Reputation Power: 0
Thanks for the reply. I guess I am just used to dealing with varialbles like in php.

Eclipce

Reply With Quote
  #6  
Old May 20th, 2002, 11:21 PM
echoknight echoknight is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 17 echoknight User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to echoknight
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.

Reply With Quote
  #7  
Old June 17th, 2002, 02:50 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Unhappy 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.
__________________
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.

Reply With Quote
  #8  
Old June 17th, 2002, 03:01 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
Imho "the" C-Manual is the "Kernighan and Ritchie - Programming C". These two guys "invented" C (and unix i think).

Reply With Quote
  #9  
Old June 17th, 2002, 06:03 PM
jonsagara's Avatar
jonsagara jonsagara is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: USA
Posts: 286 jonsagara User rank is Private First Class (20 - 50 Reputation Level)jonsagara User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 m 23 sec
Reputation Power: 7
... and the "standard" C++ book is "The C++ Programming Language", written by Bjarne Stroustrup, the creator of C++.

Reply With Quote
  #10  
Old June 19th, 2002, 07:27 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Unhappy Again..........

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

Reply With Quote
  #11  
Old June 19th, 2002, 08:19 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
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.

Reply With Quote
  #12  
Old June 20th, 2002, 04:43 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
Unhappy So what is I am supposed to do?

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.

Reply With Quote
  #13  
Old June 20th, 2002, 07:38 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
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.

Reply With Quote
  #14  
Old June 21st, 2002, 07:28 AM
shleda's Avatar
shleda shleda is offline
Born Looser
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: /root
Posts: 175 shleda User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 57 m 3 sec
Reputation Power: 7
Send a message via Yahoo to shleda
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. )

Reply With Quote
  #15  
Old June 21st, 2002, 07:57 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,840 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 2 Days 36 m 16 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
Well, the users guide that came with TC++ is a pretty decent reference. It was made by boreland.