Any way to practice C programming?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

Q

Lifer
Jul 21, 2005
12,046
4
81
Originally posted by: GodlessAstronomer
Well that depends which language you want to use. Presumably C++ (which can also compile C code IIRC).

WTF I click download/run, and nothing happens. I restarted my laptop and same thing happened. It should go to installer but nope.
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
If you really want to learn C, then get K&R's book and gcc and learn it. Or if you really want to be ahead of the curve, listen to SunnyD and find out what environment your CS courses will be in, and learn that. Don't use IDEs unless you have to -- you wont' have a good understanding of what is 'C' and what is 'IDE'.

While its true that ANSI C is ANSI C (/cite SunnyD), very few folks actually teach ANSI C. They teach C + useful functions on the platform, and when those functions go away, things get confusing. So, figure out what platform you're going to be learning on and stick to that.

Lastly, if you have any specific questions along the way, ask here. We've got a lot of old grumpy C experts who just love helpin' the younguns.

Edit: Apparently I missed the second page of posts...
 

QuixoticOne

Golden Member
Nov 4, 2005
1,855
0
0
http://download.microsoft.com/...B3FC9FE62D/vcsetup.exe
There's the full download link for the C++ web installer.

Like many of Microsoft's brain damaged / broken web pages, their download page doesn't work at all if you don't have java script enabled, and it may well also not work unless cookies enabled and maybe even using Internet Explorer instead of Firefox in its default configuration as well. Many of their pages have some combination of those broken / inaccessible attributes.

Personally I'd suggest just downloading the CD/DVD ISO image of all their tools instead of just downloading one at a time and then still probably having to create a backup DVD if you want to preserve them for future reinstallation.

Originally posted by: Common Courtesy
I went to this page

Express Download

Selecting the VC++ 2008 Express Edition w/ the default English generated this web install and a popup to save

 

Q

Lifer
Jul 21, 2005
12,046
4
81
Originally posted by: Common Courtesy
Most graohical type IDEs will allow you to execute/etst your code using a control button to start/debug your application.

Download VS Express (free)

Follow instrucitons to create a project.

Create the proper source files or include existing files into your project.

Compile your code using the Build option.

Use the Debug options to test your compiled code

I don't know what that means.

I copied/pasted a program from my lab, but I don't understand how to get it to run.
I get a build error everytime. This is in MS VS Express C++


>mt.exe : general error c10100b1: Failed to load file ".\Debug\lab4.exe". The system cannot find the file specified.
1>Build log was saved at "file://c:\Users\Colin\Documents\Visual Studio 2008\Projects\lab4\Debug\BuildLog.htm"
1>lab4 - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Google on "general error c10100b1." It may be a simple configuration problem. Visual Studio is much more than a compiler, and you get the best results when you work within its native paradigms. That means creating the right type of solution and project for the source file you want to compile, for one thing. For testing stuff I usually keep a "test" project on disk for C++, and one for C# (although I use Snippet Compiler just as often there). This is a VS solution with a single project with one source file in it. I copy the code I want to test into that source file.
 

Net

Golden Member
Aug 30, 2003
1,592
3
81
if your school is like mine then all the labs are on a website so you can work ahead if you want to.

if you want to get ahead of the class i would do the labs and homework ahead of time. then you can kill to birds with one stone.

or in other words focus mastering what the class teaches you instead of getting too side tracked. then you'll learn it well and have excellent grades.