C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 01-31-2009, 02:37 PM   #1
Registered User
 
Join Date: Jan 2009
Posts: 35
Unhappy I have some questions :(

Q1: whats the easiest way to get your head around c?
Because no matter how hard I try and understand it just keeps confuses me

Q2: whats the difference between c and c++?
Q3: whats the difference between borland complier and dev complier?

Im asking this becasue Ive been given an scenario for an assignment and I feel lost becasue I cant do it due to the fact it confuses me becasue tutorials dont explain clear enough. It has to be in on the 11th feb and I have to not only write the program but do the paperwork as well. I know boards like these arent meant to help but I need some sort of guidance, everyone in my class is going to leave this assignment to the last minute and I dont want to do that, the lecture did give out handouts but its for borland and I cant install that plus I dont like it so Im using dev hence why I asked the difference question and again like everything else the handouts confuse me, I dont want to corner him outside of class because I'l feel weak and I dont want to shoot him 25 million questions becasue he has other students to help.

I feel like Im stuck between a rock and a hard place

Thanks for any help, GRG
geekrockergal is offline   Reply With Quote
Old 01-31-2009, 03:04 PM   #2
subminimalist
 
MK27's Avatar
 
Join Date: Jul 2008
Location: NYC
Posts: 3,944
I have never used c++ but I would guess that the "object oriented" paradigm would be a central concept in the answer to #2. Unfortunately, if you don't know any other languages and are this new to C, I think it will be very hard or impossible for you to get much of a grasp on what object oriented could mean. If you have to write a paper on the topic anyway, the goal cannot really be more than to familiarize yourself with the topic as best you can -- which to repeat I am sure that is about object orientedness in question #2.

Regarding question #1: I learned perl before I came to C which I think gave me a perspective that you might not have if the first language you learned required you to do so much "low level" work with memory allocation and variables (ie. pointers). That also helped to reveal how very very clever the referencing system is and why C is supposed to be the "fastest" language above assembly. But when you are first learning it most people would probably admit it seems ridiculous to go to such lengths manipulating the information in a computer's RAM! So I would say the best thing to do is really focus on the pointer issue, especially the difference between a variable which is a copy of part of another variable, and a variable which points to a section of an existing variable. Eg.
Code:
x=y;
*x=&y;
In both cases, x and y are the same, but in the first case this is a value which exists as two seperate values in two different places, so now
Code:
x+=2;
*x+=2;
In the first case, x=4 and y=2, while in the second x and y = 4. This has some inherently vectorish dimension (a vector is a mathematical transformation performed on multiple values simultaneously), although really it's not a vector. This might seem slightly esoteric or irrelevent BUT, while I'm not sure if C was the very first language to do this (it could have been a necessity?) I am sure it's very central to it's structure, evolution, and use (value). C is just tricks with bytes -- get it? Really true.
__________________

Accuracy and integrity mean nothing if you don't make it past the censors...PYTHAGORAS

Last edited by MK27; 01-31-2009 at 04:48 PM.
MK27 is offline   Reply With Quote
Old 01-31-2009, 03:20 PM   #3
Mysterious C++ User
 
Join Date: Oct 2007
Posts: 14,099
Quote:
Originally Posted by MK27 View Post
I have never used c++ but I would guess that the "object oriented" paradigm would be a central concept in the answer to #2
No, not quite.
C++ is multi-paradigm; programmers program not with one paradigm, but several.
OOP and Generic, among them, as well as Imperial or something, I think?
Anyway, you can think of C++ as a more modern C. For specifics, there are plenty of pages out there that explains it all. Too much to list.
__________________
Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System
I dedicated my life to helping others. This is only a small sample of what they said:
"Thanks Elysia. You're a programming master! How the hell do you know every thing?"
Quoted... at least once.
Quote:
Originally Posted by cpjust
If C++ is 2 steps forward from C, then I'd say Java is 1 step forward and 2 steps back.
Elysia is offline   Reply With Quote
Old 01-31-2009, 03:23 PM   #4
Registered User
 
Join Date: Apr 2008
Posts: 278
Quote:
Q1: whats the easiest way to get your head around c?
...
Im asking this becasue Ive been given an scenario for an assignment and I feel lost becasue I cant do it due to the fact it confuses me becasue tutorials dont explain clear enough. It has to be in on the 11th feb and I have to not only write the program but do the paperwork as well.
..
You cannot master* C in 11 days, whatever approach you take. You can still learn the basics depending on your current knowledge and depending on the type of project you have to complete. You can find a lot of operational code on the net, so you could simply assemble those pieces into a functional program, without understanding all the implementation details (but you have to be able to justify your choices). As for the development environment, use whatever you can install, the differences are irrelevant at this point (except that you must be operational quickly with it, i.e. be able to edit files, modify them and compile the project and test your code).

*in the sense: to write reasonably complex programs using all C facilities

PS: several of your questions are answered in the FAQ board

Last edited by root4; 01-31-2009 at 04:06 PM.
root4 is offline   Reply With Quote
Old 01-31-2009, 04:14 PM   #5
and the Hat of Ass
 
Join Date: Dec 2007
Posts: 730
It's always just possible that C programming is not for you. There's no shame in that. The soft sciences, like sociology, are not for me.

We may be able to help if you can tell us what you can't "wrap your head around." Maybe someone can explain it in some way that makes more sense.
rags_to_riches is offline   Reply With Quote
Old 01-31-2009, 07:16 PM   #6
Algorithm Dissector
 
iMalc's Avatar
 
Join Date: Dec 2005
Location: New Zealand
Posts: 2,476
Quote:
Originally Posted by Elysia View Post
No, not quite.
C++ is multi-paradigm; programmers program not with one paradigm, but several.
OOP and Generic, among them, as well as Imperial or something, I think?
Anyway, you can think of C++ as a more modern C. For specifics, there are plenty of pages out there that explains it all. Too much to list.
"Imperative" is what you're looking for. "Procedural" is another term for it.

Which compiler you use shouldn't make much difference at this point.
__________________
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
iMalc is offline   Reply With Quote
Old 01-31-2009, 07:33 PM   #7
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
Learning a first programming language isn't very easy - the main reason being that you also have to learn PROGRAMMING/SOFTWARE DEVELOPMENT - at least at the basic level.

Learnig programming is a bit like learning to drive, whilst learning a language is like getting used to driving a particular model of car - there are differences, especially if we were to compare, say, a high-performance sports-car with a big truck - they don't behave the same way. But the basic driving skills you need for one is the same that you use for the other. So programming skill in general is the basic learning, and if you understand well how to write programs in language X, you can most likely do reasonably well in languages Y and Z as well.

C, and to a large extent C++, are not great beginner languages either - it is far too easy to make simple mistakes and they go unnoticed for a long time - which is not a good idea when learning, because discovering what is wrong when the problem and the cause of the problem are far apart makes it much harder. [Elysia will say that C++ is much better, which I agree that it is to some extent, but it is not a SAFE language by any reasonable meaning of that term - particularly not when using the classic C features that are still part of the C++ language].

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 01-31-2009, 07:47 PM   #8
In my head
 
Join Date: Dec 2008
Location: In my head
Posts: 293
Quote:
Originally Posted by geekrockergal View Post

Q2: whats the difference between c and c++?
Here's a list of differences, from the FAQ.

http://faq.cprogramming.com/cgi-bin/...&id=1043284376

Quote:
Q3: whats the difference between borland complier and dev complier?
I have found Dev C++ to be much easier to use. It compiles the program, and makes an .exe file in the same directory as the source file. Nice and simple.

Borland creates 3 or 4 folders, then puts different files in different folders. It can be confusing for a newbie.

EDIT: And I've been self-learning C for about 2 months. All you really need is to know the keywords, and the syntax, and use logic when writing your programs, and it's amazing what you can achieve with C.
__________________
Quote:
Originally Posted by zacs7
Not sure why people care what Linus [Torvalds] thinks, he's nothing amazing. Just some arrogant dude who did something once, living in his own virtual world.

Last edited by happyclown; 01-31-2009 at 07:51 PM.
happyclown is offline   Reply With Quote
Old 01-31-2009, 07:55 PM   #9
In my head
 
Join Date: Dec 2008
Location: In my head
Posts: 293
Quote:
Originally Posted by MK27 View Post
I have never used c++...
That came as a surprise.

You are good with C, so if C++ does some things better than C, why don't you give C++ a go?

Best of both worlds.
__________________
Quote:
Originally Posted by zacs7
Not sure why people care what Linus [Torvalds] thinks, he's nothing amazing. Just some arrogant dude who did something once, living in his own virtual world.
happyclown is offline   Reply With Quote
Old 01-31-2009, 10:56 PM   #10
Registered User
 
Join Date: Sep 2006
Posts: 2,512
Quote:
Originally Posted by geekrockergal View Post
Q1: whats the easiest way to get your head around c?
Because no matter how hard I try and understand it just keeps confuses me

Q2: whats the difference between c and c++?
Q3: whats the difference between borland complier and dev complier?

Im asking this becasue Ive been given an scenario for an assignment and I feel lost becasue I cant do it due to the fact it confuses me becasue tutorials dont explain clear enough. It has to be in on the 11th feb and I have to not only write the program but do the paperwork as well. I know boards like these arent meant to help but I need some sort of guidance, everyone in my class is going to leave this assignment to the last minute and I dont want to do that, the lecture did give out handouts but its for borland and I cant install that plus I dont like it so Im using dev hence why I asked the difference question and again like everything else the handouts confuse me, I dont want to corner him outside of class because I'l feel weak and I dont want to shoot him 25 million questions becasue he has other students to help.

I feel like Im stuck between a rock and a hard place

Thanks for any help, GRG
If your teacher is giving your class further info to do your work, which is specific to using Borland, then you should switch to the borland compiler and ide. D'uh!

Borland IDE has hundreds of examples you can bring up, including nearly any key word in C, just by pressing crtl + f1, an index to every key word in C/C++ is shown, with a search available including an example in code, so I don't believe you know what you're talking about.

I still write short utility and puzzle programs with Borland's Turbo C/C++, so your misstatements of facts are quite obvious to me.

you posted: "I know boards like these arent meant to help but I need some sort of guidance" ... .

Which is also completely wrong - we help hundreds of students and others, with C programming problems. How can you look at this forum, which is filled with help requests and helpful answers, and write that?
Adak is offline   Reply With Quote
Old 02-01-2009, 02:40 AM   #11
Registered User
 
Join Date: Jan 2009
Posts: 35
Quote:
Originally Posted by Adak View Post
If your teacher is giving your class further info to do your work, which is specific to using Borland, then you should switch to the borland compiler and ide. D'uh!

Borland IDE has hundreds of examples you can bring up, including nearly any key word in C, just by pressing crtl + f1, an index to every key word in C/C++ is shown, with a search available including an example in code, so I don't believe you know what you're talking about.

I still write short utility and puzzle programs with Borland's Turbo C/C++, so your misstatements of facts are quite obvious to me.

you posted: "I know boards like these arent meant to help but I need some sort of guidance" ... .

Which is also completely wrong - we help hundreds of students and others, with C programming problems. How can you look at this forum, which is filled with help requests and helpful answers, and write that?
A: I dont like using borland, I much perfer dev
AND
B: the last time I asked a "educational question" a admin told me off
AND
C: the only other langue I've used is visual basic

and out of all that you wrote this is the only thing I thank you for:
"Borland IDE has hundreds of examples you can bring up, including nearly any key word in C, just by pressing crtl + f1, an index to every key word in C/C++ is shown, with a search available including an example in code"
but I dont thank you for any thing before or after those 2 sentences

Last edited by geekrockergal; 02-01-2009 at 07:44 AM.
geekrockergal is offline   Reply With Quote
Old 02-01-2009, 06:33 AM   #12
Mysterious C++ User
 
Join Date: Oct 2007
Posts: 14,099
And the Turbo compiler is very out-of-date, which means avoiding it.
Also, for the record, Bjarne, the creator of C++, originally created C++ to meet the needs of several languages. The speed of C, as well as more features such as OOP from other languages.
That is why C++ is such a popular tool today, and why it is also such a great tool.
__________________
Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System
I dedicated my life to helping others. This is only a small sample of what they said:
"Thanks Elysia. You're a programming master! How the hell do you know every thing?"
Quoted... at least once.
Quote:
Originally Posted by cpjust
If C++ is 2 steps forward from C, then I'd say Java is 1 step forward and 2 steps back.
Elysia is offline   Reply With Quote
Old 02-01-2009, 06:49 AM   #13
Woof, woof!
 
zacs7's Avatar
 
Join Date: Mar 2007
Location: Australia
Posts: 3,139
> And the Turbo compiler is very out-of-date, which means avoiding it.
Turbo C++ isn't but Turbo C is. Either way not a very good compiler IMO.

> That is why C++ is such a popular tool today, and why it is also such a great tool.
And also what sometimes makes it a terrible tool for the job
__________________
"I.T. gets the chicky-babes" - M. Kelly
bakefile | vim
zacs7 is offline   Reply With Quote
Old 02-01-2009, 06:51 AM   #14
Mysterious C++ User
 
Join Date: Oct 2007
Posts: 14,099
Well, it can't be good at everything, no
But the same goes for C, and any other programming language as well
__________________
Using: Microsoft Windows™ 7 Professional (x64), Microsoft Visual Studio™ 2008 Team System
I dedicated my life to helping others. This is only a small sample of what they said:
"Thanks Elysia. You're a programming master! How the hell do you know every thing?"
Quoted... at least once.
Quote:
Originally Posted by cpjust
If C++ is 2 steps forward from C, then I'd say Java is 1 step forward and 2 steps back.
Elysia is offline   Reply With Quote
Old 02-01-2009, 06:53 AM   #15
Woof, woof!
 
zacs7's Avatar
 
Join Date: Mar 2007
Location: Australia
Posts: 3,139
> and any other programming language as well
Lisp seems to come close... but that has a silly name so we can ignore it
__________________
"I.T. gets the chicky-babes" - M. Kelly
bakefile | vim
zacs7 is offline   Reply With Quote
Reply

Tags
questions

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
questions....so many questions about random numbers.... face_master C++ Programming 2 07-30-2009 08:47 AM
A very long list of questions... maybe to long... Ravens'sWrath C Programming 16 05-16-2007 05:36 AM
Several Questions, main one is about protected memory Tron 9000 C Programming 3 06-02-2005 07:42 AM
Trivial questions - what to do? Aerie A Brief History of Cprogramming.com 23 12-26-2004 09:44 AM
questions questions questions..... mfc2themax A Brief History of Cprogramming.com 1 08-14-2001 07:22 AM


All times are GMT -6. The time now is 05:16 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22