Can anyone suggest a book on how to develop sofware using c programming language?
If ebook is available, please give links.
for basic windows programming mr.Charles Petzold :
http://www.charlespetzold.com/pw5/index.html
for advanced windows programming mr.Jeffrey Richter :
http://www.amazon.com/Programming-Applications-Microsoft-Windows-Series/dp/1572319968
starting with C classic one by K&R :
http://www.amazon.com/C-Programming-Language-2nd-Edition/dp/0131103628
Also do some Google searches for "Teach yourself C in 21 days"... You can view the entire book online in several places. Or you can order from Amazon... It's a bit more basic than K&R and might serve as a good build up to the more advanced texts.
Also, you should note that ALL these various tomes are intended to be used in a course of deliberate study. You can't just read them and count on the (average) 50% retention to get you through it. You really do need to study each page, try all the examples, play with the code -- change it, break it, fix it-- and make sure you understand each section before you move on to the next...
As the old joke goes... C is easy, Programming is hard.
Good luck on the journey... :D
theForger's Win32 API Tutorial :
http://www.winprog.org/tutorial
English PDF :
http://winprog.org/tutorial/files/forgers-win32-tutorial-pdf.zip
Quote from: Vortex on June 03, 2012, 11:29:49 PM
theForger's Win32 API Tutorial :
http://www.winprog.org/tutorial
English PDF :
http://winprog.org/tutorial/files/forgers-win32-tutorial-pdf.zip
:D One of my faves...
Thanks to all of you for these suggestions.
For learning C, have a look at "C Programming, a Modern Approach, 2nd Edition" by King.
IMHO, one of the best introductory texts ever written for C.
For Windows Programming, the already suggested "Forger's Win32 API Tutorial" is an excellent start.
Pls visit the Site Collectiva (http://collectiva.in/) To learn Fundamentals of C Programming online Video Training in Tamil. It is very useful for the Beginners. Very soon the Video Training in English will be uploaded.
Quote from: collectiva on June 15, 2012, 03:05:11 PM
Pls visit the Site Collectiva (http://collectiva.in/%22) To learn Fundamentals of C Programming online Video Training in Tamil. It is very useful for the Beginners. Very soon the Video Training in English will be uploaded.
Well, I went to your website and after it opened about 20 tabs, I finally found your video training page and you're probably going to get real upset at me because of this, but I am going to raise some issues here...
1) It's been my experience that
nobody learns anything from videos. The average for retained information when passively reading is about 50% and when passively watching a video that falls to something like 20%.
2) Given the oft reported abysimal state of education in India and the use of an IDE and compiler that haven't been updated since 2005 (Quincy IDE) I'm not going to say much more but I will point you at this
Wallstreet Journal Article (http://online.wsj.com/article/SB10001424052748703515504576142092863219826.html) in which it becomes abundently clear that India has real problems dealing with today's latest engineering and technologies. From other Forums I know this problem is real as we saw it every semester as students came online
begging for answers to problems they did not understand and a lot of it was pretty basic stuff like making change or figuring out how much paint you need...
3) The correct form of a console program is:
int main (void)
{ int errorlevel = 0;
// your code here
return errorlevel;
}
// OR
int main (int argc, char* argv[])
{ int errorlevel = 0;
// your code here
return errorlevel;
}
The returned errorlevel is required by just about every OS as a means of determining if the program worked correctly or not. (errorlevel is a user variable who's value is calculated by run time error handling code.)
The only way to learn programming, no matter what language, is to sit down with the book (or e-book) and work through it page by page, typing up and working with every example and quiz as you go; retention rises to almost 80% this way. You need to work with the code to see what does and doesn't work (both are equally important). You need to understand each section before moving on to the next page... Anything short of this allows faulty recall to limit your absorbtion of necessary skills.
Moreover; there's no point learning on outdated setups with half-functional rad tools included as this just creates a second --far more difficult-- learning curve as the programmer has to un-learn bad habits at the same time as learning about more modern procedures and standards. I wish I had a dollar for every student I've had to tell why Turbo C won't work on 64 bit OSs.
I'm sorry, but I just can't recommend your site to anyone.
Where is this video located? I was unable to spot it during the first 1-2 minutes of my visit, so I left the site.
PS. I'd like to mention another rather common parameter (but not exactly standard) for the main function: char **envp (holding a list of the environment variables)... it comes 3rd in the parameters list.
Quote from: migf1 on June 15, 2012, 06:24:27 PM
Where is this video located? I was unable to spot it during the first 1-2 minutes of my visit, so I left the site.
Click the More link in the Programming Contest then look for the Training Videos... you will need to take out a password to see anything but the samples.
If you do enter the contest, you should expect your code to be plagerized. India's copyright laws are pretty loose.
Quote
PS. I'd like to mention another rather common parameter (but not exactly standard) for the main function: char **envp (holding a list of the environment variables)... it comes 3rd in the parameters list.
Thanks... forgot about that one. (I use GetEnvironmentString() mostly)
Quote from: migf1 on June 15, 2012, 06:24:27 PM
PS. I'd like to mention another rather common parameter (but not exactly standard) for the main function: char **envp (holding a list of the environment variables)... it comes 3rd in the parameters list.
This is not working in Pelles C, see this (http://forum.pellesc.de/index.php?topic=2472.msg9373#msg9373).
Quote from: czerny on June 16, 2012, 10:57:54 AM
Quote from: migf1 on June 15, 2012, 06:24:27 PM
PS. I'd like to mention another rather common parameter (but not exactly standard) for the main function: char **envp (holding a list of the environment variables)... it comes 3rd in the parameters list.
This is not working in Pelles C, see this (http://forum.pellesc.de/index.php?topic=2472.msg9373#msg9373).
Yeap, as I mentioned it is not standard C. However, modern posix, ms and macos-x all support it.
PS1. Not a bad idea for Pelle to also support it in future versions, too ;)
PS2. Thanks for the video pointer, tater.
Quote from: migf1 on June 16, 2012, 12:20:27 PM
Yeap, as I mentioned it is not standard C. However, modern posix, ms and macos-x all support it.
PS1. Not a bad idea for Pelle to also support it in future versions, too ;)
Maybe maybe not... In all my time here you're the first to mention it, so it wouldn't seem to be in demand. The windows API provides very nice tools for enumerating and parsing environment variables and since Pelles C is, for the most part Windows API based, I'm guessing that's the way to go.
Quote
PS2. Thanks for the video pointer, tater.
You're welcome ....
Quote from: CommonTater on June 16, 2012, 04:10:39 PM
Maybe maybe not... In all my time here you're the first to mention it, so it wouldn't seem to be in demand. The windows API provides very nice tools for enumerating and parsing environment variables and since Pelles C is, for the most part Windows API based, I'm guessing that's the way to go.
Judging from czerny's link, he was the 1st one mentioning it ;)
Anyway, the only reason for suggesting its addition was in the case Pelle wanted Pelles C to be more compatible with MS c-runtime. Its not a big deal, since getenv() can be used for getting a known environment variable and it is part of the standard C (already supported by Pelles C)... but it cannot enumerate the environment.
Actually, I don't even know if and how many people are aware about this 3rd parameter of the main() function. But Google returns a bloated load of links mentioning it, when searching for "environment variables enumeration in c". In that sense, it certainly won't hurt if Pelles C would support it too ;)
Quote from: migf1 on June 16, 2012, 04:29:58 PM
Actually, I don't even know if and how many people are aware about this 3rd parameter of the main() function. But Google returns a bloated load of links mentioning it, when searching for "environment variables enumeration in c". In that sense, it certainly won't hurt if Pelles C would support it too ;)
Then you should put in a feature request ... Write up a little article demonstrating the need and see what happens. :D Pelle is very good about saying "yes" or "no" to these things, which is as it should be.
Actually, I'm not concerned that much about Pelles C's support of envp, because I use mingw gcc along with Pelles.
I only mentioned it for the shake of completeness, regarding main(), because it's quite common on most c-platforms, or at least on the most popular among them.
PS. What kinda bothers me though, is the fact that I cannot close poIDE tabs by double-clicking on them (this I will officially file it as a feature request, but I have to search that it is not already filed).
Quote from: migf1 on June 16, 2012, 04:44:33 PM
Actually, I'm not concerned that much about Pelles C's support of envp, because I use mingw gcc along with PS. What kinda bothers me though, is the fact that I cannot close poIDE tabs by double-clicking on them (this I will officially file it as a feature request, but I have to search that it is not already filed).
Try right clicking on the tabs...
I'd rather they not close on double clicks, as a safety measure against accidental closures.
Quote from: CommonTater on June 16, 2012, 04:52:07 PM
Try right clicking on the tabs...
I'd rather they not close on double clicks, as a safety measure against accidental closures.
Right-clicking works just fine, but it slows me down so much :)
Of course I'll request it as an optional addition to the current behavior.
PS. I've hi-jacked the topic :P
Quote from: migf1 on June 16, 2012, 04:58:27 PM
PS. I've hi-jacked the topic :P
Since I've already done it ;D , allow me to abuse it a little bit more: does version 7.00rc3 come without any pre-installed addons? I installed it today on my Win7 64bit machine and it didn't have any.
Quote from: migf1 on June 16, 2012, 05:14:31 PM
Quote from: migf1 on June 16, 2012, 04:58:27 PM
PS. I've hi-jacked the topic :P
Since I've already done it ;D , allow me to abuse it a little bit more: does version 7.00rc3 come without any pre-installed addons? I installed it today on my Win7 64bit machine and it didn't have any.
Install the AddIn SDK as well... you'll get a couple of extra wizards and addins in the bargain.
Cool, thanks :)
Quote from: migf1 on June 16, 2012, 04:29:58 PM
Anyway, the only reason for suggesting its addition was in the case Pelle wanted Pelles C to be more compatible with MS c-runtime.
What M$ C runtime? Microsoft has pretty much abandoned C, caring only about their C++?Ccrap stuff...
Pelle's C is pretty much the only serious plain C compiler out there, and his intentions seems to to adhere to the C standards, which is perfectly fine...
Ralf
Quote from: Bitbeisser on June 16, 2012, 05:59:45 PMWhat M$ C runtime? Microsoft has pretty much abandoned C, caring only about their C++?Ccrap stuff...
That's so very true!
However, VC++, C++ Builder and MinGw are very (very) popular and by default they use the MS C runtime. I thought it would be nice if Pelles could give those users one more reason to make the switch ;)
QuotePelle's C is pretty much the only serious plain C compiler out there, and his intentions seems to to adhere to the C standards,...
Ralf
No question about that!
Quote from: migf1 on June 16, 2012, 12:20:27 PM
Yeap, as I mentioned it is not standard C. However, modern posix, ms and macos-x all support it.
PS1. Not a bad idea for Pelle to also support it in future versions, too ;)
If I remember right, I had to port a third party library. In such cases it would be very handy to have this option or the POSIX variant.
The main entry point signature is described as to support the environment block at The main Function and Program Execution (http://msdn.microsoft.com/en-us/library/3ze4ytsc%28VS.80%29.aspx) at MSDN.
Since we are developing for Windows, we should have the ability to use the official signature of the main function.
Quote from: czerny on June 16, 2012, 06:58:25 PM
...
In such cases it would be very handy to have this option or the POSIX variant.
Starting from the msdn main() link presented by Stefan Pendl, I just discovered that a corresponding char **_environ global var is also present in the MS C runtime, via <stdlib.h> (along with its wide variant, _wenviron): http://msdn.microsoft.com/en-us/library/stxk41x1%28v=vs.80%29.aspx
Although it is clearly marked as depreciated at msdn, I just tested it with the latest mingw gcc and it works just fine...
#include <stdio.h>
#include <stdlib.h>
int main( void )
{
extern char **_environ;
char **env = _environ;
while ( *env )
puts( *env++ );
system( "pause" );
exit(0);
}
Pelles C doesn't support it though.
After taking a closer look the third parameter seems to be M$ VS/VC specific.
Anyways this would just be the environment block state at the start of the program, which can easily be retrieved by the GetEnvironmentStrings function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms683187%28v=vs.85%29.aspx).
Quote from: Stefan Pendl on June 17, 2012, 12:03:32 AM
After taking a closer look the third parameter seems to be M$ VS/VC specific.
Yeap, it's not standard C.
But it is supported by most major c dev platforms (windows, posix, macos).
QuoteAnyways this would just be the environment block state at the start of the program, which can easily be retrieved by the GetEnvironmentStrings function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms683187%28v=vs.85%29.aspx).
Yes, CommonTater also pointed it out.