I've just decided that I should stop abusing PHP scripts for everything I wish to achieve in the field of file manipulation and decided that now is as good a time as any to start learning a bit more about C programming. I've done a bit before for my Operating Systems course, but only a bit.
Anyway, I've got my compiler set up and my first "Hello world" program written (with name recognition, ain't I cool ) and tested to work. Now I need to (or would like to) get a few rather complex things to work:
- Parsing a given XML file
- Loading and slightly manipulating images (mostly bitmaps, and I know how to work with bitmaps so I really just need to read the contents of a file)
- Writing to another file
In other words; I need a few good tutorials about C in general and about file manipulation. And I'd appreciate some libraries for XML parsing and image loading. What would you guys recommend that will get me on my way FAST so I can get back to do things that are more relevant to this project?
(FYI: I'm working on the intro cinematic for TCOL, and I'm loading and converting lots of bitmaps and stuff to include files with PHP but it's getting too crappy to work with so I want to redo it, and redo it good this time)
[PC C] A few beginner questions
Moderator: MaxCoderz Staff
[PC C] A few beginner questions
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
-
- MCF Legend
- Posts: 1601
- Joined: Mon 20 Dec, 2004 8:45 am
- Location: Budapest, Absurdistan
- Contact:
Given this context I'd say you should pick a different task to brush up on C.
Here's a tutorial that seems to be good at first glance:
http://www.le.ac.uk/cc/tutorials/c/
I could only google for libraries too, so I won't recommend any. But writing your own XML parser is also pretty simple if you don't handle errors (which is unnecessary if you work with your own files), since the format is rigid enough. And an excellent task to practice memory handling (at least if you want to parse it into a tree).
Here's a tutorial that seems to be good at first glance:
http://www.le.ac.uk/cc/tutorials/c/
I could only google for libraries too, so I won't recommend any. But writing your own XML parser is also pretty simple if you don't handle errors (which is unnecessary if you work with your own files), since the format is rigid enough. And an excellent task to practice memory handling (at least if you want to parse it into a tree).
- benryves
- Maxcoderz Staff
- Posts: 3089
- Joined: Thu 16 Dec, 2004 10:06 pm
- Location: Croydon, England
- Contact:
Er... why C for any of those?
.NET is language agnostic, so with VB it'd be much the same (and I'm sure kv would back me up on this count).
The key word being FAST. C# is (loosely) C-style and gives you access to the .NET framework which has extensive classes for XML document parsing, bitmap manipulation (Bitmap here meaning a raster graphic, not exclusively a Windows BMP) and text and binary file reading/writing.What would you guys recommend that will get me on my way FAST so I can get back to do things that are more relevant to this project?
.NET is language agnostic, so with VB it'd be much the same (and I'm sure kv would back me up on this count).
Last edited by benryves on Wed 26 Jul, 2006 9:37 am, edited 1 time in total.
- kv83
- Maxcoderz Staff
- Posts: 2735
- Joined: Wed 15 Dec, 2004 7:26 pm
- Location: The Hague, Netherlands
- Contact:
Exactly what I was thinking too, ben. Try C# for those tasks you describe. It works like a charm with xml. It feels as if those two languages were made for each other
Jup. VB.NET and C#.NET are almost the same, just a little different syntax (like defining variables). I do like C# a little more, though EM is in VB.NET for example It really doesn't matter which you pick up first(and I'm sure kv would back me up on this count)
Okay, okay... kv got me convinced to give C# another try on MSN, and I must say I like it more Still, it would've been a good idea to play with C a bit because I think it would've been more educational.
So... I'm back to my extended Hello World console app, watching C# for beginners videos (which make me feel really smart ) trying to get to the lesson about XML parsing... I'll get back to you guys if I need some help but I think I'll be okay for most of this now Thanks!
So... I'm back to my extended Hello World console app, watching C# for beginners videos (which make me feel really smart ) trying to get to the lesson about XML parsing... I'll get back to you guys if I need some help but I think I'll be okay for most of this now Thanks!
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS