Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
12/12/2007 9:41:08 PM EDT
I heard in Engineering Class today we will be leaning C++ in our computer programming class, as opposed to older class curriculum that taught Fortran.

Whats it like?

Difficult?

Whats the language look like?

I have been a CNC programmer as a machinist for about 10 years now, so I somewhat understand the logistics of programming codes to make machines do what I ask.

Will that help at all?
12/12/2007 9:47:13 PM EDT
[#1]

Quoted:
I have been a CNC programmer as a machinist for about 10 years now, so I somewhat understand the logistics of programming codes to make machines do what I ask.

Will that help at all?


Not really.

Are you good at math? You won't use much in your programs, but if you're naturally good at math, you'll find that programing comes naturally as well.

There are examples of C++ code everywhere. The majority of Open Source programs are written in C, followed by C++.
12/12/2007 9:48:22 PM EDT
[#2]
I am trying to teach myself C, to program microcontrollers.
12/12/2007 9:49:51 PM EDT
[#3]
C++ is a great language.  One of the most widely used programming languages in the world.

It's not my first choice for a 'teaching' language (that would be Python), but it's very good.  I learned it in college, spent ten years of my life programming in it.
12/12/2007 9:51:34 PM EDT
[#4]

Quoted:

Quoted:
I have been a CNC programmer as a machinist for about 10 years now, so I somewhat understand the logistics of programming codes to make machines do what I ask.

Will that help at all?


Not really.

Are you good at math? You won't use much in your programs, but if you're naturally good at math, you'll find that programing comes naturally as well.

There are examples of C++ code everywhere. The majority of Open Source programs are written in C, followed by C++.


I'm pretty good at math, and by the time I take this course, I'll be in either Calc I or Calc II.

That will help with the logical thinking type aspect or something?
12/12/2007 9:56:01 PM EDT
[#5]

Quoted:
I'm pretty good at math, and by the time I take this course, I'll be in either Calc I or Calc II.

That will help with the logical thinking type aspect or something?


BIG time.
12/12/2007 9:59:44 PM EDT
[#6]

Quoted:

Quoted:

Quoted:
I have been a CNC programmer as a machinist for about 10 years now, so I somewhat understand the logistics of programming codes to make machines do what I ask.

Will that help at all?


Not really.

Are you good at math? You won't use much in your programs, but if you're naturally good at math, you'll find that programing comes naturally as well.

There are examples of C++ code everywhere. The majority of Open Source programs are written in C, followed by C++.


I'm pretty good at math, and by the time I take this course, I'll be in either Calc I or Calc II.

That will help with the logical thinking type aspect or something?


If you ignore most of what you can do with C++ and focus on perfect structure and error checking as if you were doing COBOL, you will shock everyone by always writing good C++.  Yes, the math will help.  So will being older and not distracted.
12/12/2007 10:00:34 PM EDT
[#7]

Quoted:

Quoted:
I'm pretty good at math, and by the time I take this course, I'll be in either Calc I or Calc II.

That will help with the logical thinking type aspect or something?


BIG time.


Sweet.
12/12/2007 10:01:34 PM EDT
[#8]

Quoted:
So will being older and not distracted.


Thats a definite +.

These kids today.....

Oh shit...I'm old.
12/12/2007 10:03:32 PM EDT
[#9]
Have you ever done any computer programming, in any language? I have an idea.
12/12/2007 10:04:30 PM EDT
[#10]
//C++ is a good language.  Much better than Fortran.

//It is also a fairly common language and job opportunities are vast for C++ programmers.

//I tend to think that all good programmers are mathematicians and can express ideas as mathematical expressions (algorithms).

//Bad programmers are "scripter kiddies" that cant visualize algorithms, they lack the maths.  Their brains dont have a #include math.h
12/12/2007 10:06:52 PM EDT
[#11]

Quoted:

I'm pretty good at math, and by the time I take this course, I'll be in either Calc I or Calc II.

That will help with the logical thinking type aspect or something?

Logical thinking is what programming is all about. You've got to break the problem down into small enough parts for the computer to handle. Anyways, C++ shouldn't be all that difficult if you can handle calc. The first time it will get semi-difficult is when you have to deal with pointers and stuff but that won't be for a while. You'll probably find that cin/cout are kind of annoying. Classes are also overly complicated in C++.

This will probably be your first example:

#include <iostream.h>

main()
{
   cout << "Hello World!";
   return 0;
}
12/12/2007 10:07:07 PM EDT
[#12]
Coming from a strong mainframe/COBOL/Fortran background I took to CNC programming the few times I did it like a duck to water.  I would actually expect that the opposite is true and that the OP will do fine.  Of course, I was motivated -- CNC machines are really cool!
12/12/2007 10:09:22 PM EDT
[#13]

Quoted:
Have you ever done any computer programming, in any language? I have an idea.


Just G and M code on CNC machines.

There is software to write this for you, but i do it all by hand because the software like to waste time and make redundant moves ect.

When multiplied over thousands of parts, a few seconds a piece makes a huge difference.

Heres a little sample. This is an exceptionally easy program, but its the beats I could find..

N10 G00 G20 G40 G49 G80 G90 G98
(1/4" SLOT DRILL)
N12 T3 M06
N14 S10000 M03
N16 G00 G54 G43 X0.25 Y0.1 Z1. H03 M08
N18 Z0.1
N20 G99 G81 Z-.1 R.05 F12.
N22 M97 P1000
N24 M09
(13/64" DRILL)
N26 T4 M06
N28 S3761 M03
N30 G00 G54 G43 X0.25 Y0.1 Z1. H04 M08
N32 Z0.1
N34 G99 G73 Z-1. R.05 Q.1 F18.
N36 M97 P1000
N38 M09
(1/4-20unc TAP)
N40 T3 M06
N42 S1000 M03
N44 G00 G54 G43 X0.25 Y0.1 Z1. H03 M08
N46 Z0.1
N48 G99 G84 Z-.75 R.05 F50.
N50 M97 P1000
N52 M09
N54 G91 G28 Y0 Z0
N56 G90
N58 M30
12/12/2007 10:11:29 PM EDT
[#14]

Quoted:

Quoted:
Have you ever done any computer programming, in any language? I have an idea.


Just G and M code on CNC machines.

Heres a little sample. This is an exceptionally easy program, but its the beats I could find..

N10 G00 G20 G40 G49 G80 G90 G98
(1/4" SLOT DRILL)
N12 T3 M06
N14 S10000 M03
N16 G00 G54 G43 X0.25 Y0.1 Z1. H03 M08
N18 Z0.1
N20 G99 G81 Z-.1 R.05 F12.
N22 M97 P1000
N24 M09
(13/64" DRILL)
N26 T4 M06
N28 S3761 M03
N30 G00 G54 G43 X0.25 Y0.1 Z1. H04 M08
N32 Z0.1
N34 G99 G73 Z-1. R.05 Q.1 F18.
N36 M97 P1000
N38 M09
(1/4-20unc TAP)
N40 T3 M06
N42 S1000 M03
N44 G00 G54 G43 X0.25 Y0.1 Z1. H03 M08
N46 Z0.1
N48 G99 G84 Z-.75 R.05 F50.
N50 M97 P1000
N52 M09
N54 G91 G28 Y0 Z0
N56 G90
N58 M30


Thats gibberish to me....
12/12/2007 10:19:28 PM EDT
[#15]

Quoted:
//C++ is a good language.  Much better than Fortran.

//It is also a fairly common language and job opportunities are vast for C++ programmers.

//I tend to think that all good programmers are mathematicians and can express ideas as mathematical expressions (algorithms).

//Bad programmers are "scripter kiddies" that cant visualize algorithms, they lack the maths.  Their brains dont have a #include math.h


for (x=0;x<=1;++x) {
cout << showpos << x << endl;

}
12/12/2007 10:20:18 PM EDT
[#16]

Quoted:

Quoted:
//C++ is a good language.  Much better than Fortran.

//It is also a fairly common language and job opportunities are vast for C++ programmers.

//I tend to think that all good programmers are mathematicians and can express ideas as mathematical expressions (algorithms).

//Bad programmers are "scripter kiddies" that cant visualize algorithms, they lack the maths.  Their brains dont have a #include math.h


for (x=0;x<=1;++x) {
cout << showpos << x << endl;

}


Showoff.


12/12/2007 10:23:34 PM EDT
[#17]
Programming concepts are universal.  Coming to terms with language syntax & specific functionality is the challenge.  I cut my teeth on Visual Studio 6 & GNU.  For example, some funky error messages come up if your header file function prototypes don't match the actual function implementation in the .cpp (specifically, for differing function arguments between .h & .cpp function calls - so make sure they match).

Your ideas can be good to go but you'll be stuck in a holding pattern unless/until you resolve that damned syntax error - been there, done that!

Best advice I can give is, get the code working 1st & then worry about optimization - if you have time.  Don't fancy yourself into a corner.  Start simple & implement the slick stuff incrementally as you come to grips w/ the specifics.

And yes, a strong math background helps.

Edited for stoopid stupid spelling errorz errors.
12/12/2007 10:26:47 PM EDT
[#18]

Quoted:
Programming concepts are universal.  Coming to terms with language syntax & specific functionality is the challenge.  I cut my teeth on Visual Studio 6 & GNU.  Fopr example, some funky error messages come up if your header file function prototypes don't match the actual function implementation in the .cpp (specifically, the function arguments).

Your ideas can be good to go but you'll be stuck in a holding pattern unless/until you resolve that damned syntax error - been there, done that!

Best advice I can give is, get the code working 1st & then worry about optimization - if you have time.  Don't fancy yourself into a corner.  Start simple & implement the slick stuff incrementally as you comer to grips w/ the specifics.

And yes, a strong math background helps.


Thats what i was hoping. I know it wont automatically be a piece of cake, but the logic that goes into arranging code to not only do what need to be done, but to put in order and make the machine understand it.

That makes perfect sense.
12/12/2007 10:28:52 PM EDT
[#19]

Quoted:
Thats what i was hoping. I know it wont automatically be a piece of cake, but the logic that goes into arranging code to not only do what need to be done, but to put in order and make the machine understand it.
That makes perfect sense.


Can CNC machines execute code in conditional loops? In other words, can they repeat a sequence of events x number of times, depending on the value of y?
12/12/2007 10:33:20 PM EDT
[#20]

Quoted:

Quoted:
Thats what i was hoping. I know it wont automatically be a piece of cake, but the logic that goes into arranging code to not only do what need to be done, but to put in order and make the machine understand it.
That makes perfect sense.


Can CNC machines execute code in conditional loops? In other words, can they repeat a sequence of events x number of times, depending on the value of y?


Sort of. We have subprograms and in the first line there is a call out for the subprogram number and number of times to run it.

You can also run subroutines that mixed with different locations to run the same routine in multiple places on the same part.
12/12/2007 10:35:25 PM EDT
[#21]

Quoted:

Quoted:

Quoted:
Thats what i was hoping. I know it wont automatically be a piece of cake, but the logic that goes into arranging code to not only do what need to be done, but to put in order and make the machine understand it.
That makes perfect sense.


Can CNC machines execute code in conditional loops? In other words, can they repeat a sequence of events x number of times, depending on the value of y?


Sort of. We have subprograms and in the first line there is a call out for the subprogram number and number of times to run it.

You can also run subroutines that mixed with different locations to run the same routine in multiple places on the same part.


Does the subprogram have to run a fixed number of times, or can you tell it to run until x is true?
12/12/2007 10:40:57 PM EDT
[#22]
BTW, these questions have no bearing whatsoever on your potential C++ programing ability. I'm just curious how much a CNC will let you get away with.

I don't know anything about them.
12/12/2007 10:44:35 PM EDT
[#23]

Quoted:

Quoted:

Quoted:
Thats what i was hoping. I know it wont automatically be a piece of cake, but the logic that goes into arranging code to not only do what need to be done, but to put in order and make the machine understand it.
That makes perfect sense.


Can CNC machines execute code in conditional loops? In other words, can they repeat a sequence of events x number of times, depending on the value of y?


Sort of. We have subprograms and in the first line there is a call out for the subprogram number and number of times to run it.

You can also run subroutines that mixed with different locations to run the same routine in multiple places on the same part.


Just for some help with terminology. You will eventually see the term function passed around a lot. It is really no different than a subroutine with some MINOR conceptual differences.

Here is a list of terms you should be able to know what they mean before trying to program.

Variable
mathematical operators
 plus
 minus
 times
 divide
 modulo
 replacement (=)
 really really equal to (==)
data types:
 int
 double
 string
looping structures:
 for
 while
 do-while
functions

12/12/2007 10:46:06 PM EDT
[#24]

Quoted:

Quoted:

Quoted:

Quoted:
Thats what i was hoping. I know it wont automatically be a piece of cake, but the logic that goes into arranging code to not only do what need to be done, but to put in order and make the machine understand it.
That makes perfect sense.


Can CNC machines execute code in conditional loops? In other words, can they repeat a sequence of events x number of times, depending on the value of y?


Sort of. We have subprograms and in the first line there is a call out for the subprogram number and number of times to run it.

You can also run subroutines that mixed with different locations to run the same routine in multiple places on the same part.


Does the subprogram have to run a fixed number of times, or can you tell it to run until x is true?


Some of the new CNC's are amazing. They can run a part, bring up an infrared probe, check the part, make offsets, and rerun the tools. Then call you on your cell phone if something goes wrong. If it's something simple it may be able to be fixed over the internet.

The actual subprograms usually just run the specified number of times, but as I said the new shit is unreal.

HERES AN EXAMPLE
12/12/2007 10:47:23 PM EDT
[#25]
I don't know anything about CNC programming, but C++ has been my primary programming language since about 1993. I came from C and assembler, then moved primarily to C++, with Java, VB, and now a lot of C#. I wrote the C++ test we give to job candidates.

Basic C++ is not too complicated, but it can be very complicated when you add multiple inheritance or make heavy use of templates, template meta-programming, etc. In fact, combined with STL, C++ is probably the most complicated programming environment there is.

And the language has a multitude of gotchas. Pass by reference vs. pass by value semantics for classes is one; the lack of garbage collection is another. Operator overloading allows you to compare apples to oranges.

In general, I think a mathematical background is helpful in terms of being a good programmer, but it won't make you a good programmer. Mathematics will do nothing to prepare you for OOP, which is what C++ is all about.

But it's an approachable language. If you have a programming background you will be able to muddle through without killing yourself.
12/12/2007 10:54:16 PM EDT
[#26]

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?
12/12/2007 10:57:04 PM EDT
[#27]

Quoted:
BTW, these questions have no bearing whatsoever on your potential C++ programing ability. I'm just curious how much a CNC will let you get away with.

I don't know anything about them.


HERES AN OLD MANS HIP JOINT BEING MADE

CNS has gone haywire in the last 10 years. They make some amazing shit.

And BTW, if one of those chips jumps down your shirt, you will wish it was .223 brass.
12/12/2007 10:57:23 PM EDT
[#28]

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


That question, and your name are just...perfect.
12/12/2007 11:01:16 PM EDT
[#29]

Quoted:

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


That question, and your name are just...perfect.


Thanks!
12/12/2007 11:01:52 PM EDT
[#30]

Quoted:
Programming concepts are universal.  Coming to terms with language syntax & specific functionality is the challenge.  I cut my teeth on Visual Studio 6 & GNU.  Fopr example, some funky error messages come up if your header file function prototypes don't match the actual function implementation in the .cpp (specifically, the function arguments).

Your ideas can be good to go but you'll be stuck in a holding pattern unless/until you resolve that damned syntax error - been there, done that!

Best advice I can give is, get the code working 1st & then worry about optimization - if you have time.  Don't fancy yourself into a corner.  Start simple & implement the slick stuff incrementally as you comer to grips w/ the specifics.

And yes, a strong math background helps.


Great advice.  Syntax is syntax no matter what language so as long as you can grasp the concept, any language is learnable fairly easy.  We started off in school with simple basic and qbasic. Since then, learning another programming language has become easier and easier.  I've done little in C or C++, mainly in school and that was almost 10 years ago.  I wish now I would have leaned more on the programming side rather than the hardware/networking.  Hardware is becoming so integraded, hell, most companies have 5 to 10 programmers for ever network admin where 15 years ago it felt like the exact opposite, to me anyhow.  Sorry for the hijack.
12/13/2007 8:05:45 PM EDT
[#31]

Quoted:
I don't know anything about CNC programming, but C++ has been my primary programming language since about 1993. I came from C and assembler, then moved primarily to C++, with Java, VB, and now a lot of C#. I wrote the C++ test we give to job candidates.

Basic C++ is not too complicated, but it can be very complicated when you add multiple inheritance or make heavy use of templates, template meta-programming, etc. In fact, combined with STL, C++ is probably the most complicated programming environment there is.

And the language has a multitude of gotchas. Pass by reference vs. pass by value semantics for classes is one; the lack of garbage collection is another. Operator overloading allows you to compare apples to oranges.

In general, I think a mathematical background is helpful in terms of being a good programmer, but it won't make you a good programmer. Mathematics will do nothing to prepare you for OOP, which is what C++ is all about.

But it's an approachable language. If you have a programming background you will be able to muddle through without killing yourself.


+1 - learn the various param rules; pass-by-value v. pass-by-reference & all that.  You might get into pointers (a C++ halmark of sorts, though most languages have some form of pointer/mem-addressable implementation), which are simple once you get the hang of them, but they can be elusory unless you stick to it.

And recursive function can get interesting.  One of the early mind-benders (for me) was trying to implement a rudsimentary algorithm that simulated fractal pattern output using a recursive function.  It was a basic console app that displayed patterns of '*' in sequences according to a particular starting pattern, employing an imaging routine via in the recursive function call to create the necessary fractal pattern output.  the entire program was primarily this one function; the whole thing being perhaps 1 page worth of code, but it took me most of the damned day just to coime to terms w/ it, which I ultimately did.  Probably the most satisfying part of it was going back the next day & finding out that only 5 out of the (still remaining) 17 of us in that class got it working.

Gven the natuer of your subject, it'll be interesting to hear just how deeply they delve into the C++ fundamentals.
12/13/2007 8:48:20 PM EDT
[#32]

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


The Arduino diecimila
12/13/2007 10:44:56 PM EDT
[#33]

Quoted:

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


The Arduino diecimila


Oh wow! I've used the Atmega48/88/168 series (similar?). It's a good chip to learn off of. Programming tiny MCUs is different from programming on a PC. Keep the programs as small and as simple as possible!

Best of luck!

12/13/2007 11:16:36 PM EDT
[#34]

Quoted:

Quoted:

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


The Arduino diecimila


Oh wow! I've used the Atmega48/88/168 series (similar?). It's a good chip to learn off of. Programming tiny MCUs is different from programming on a PC. Keep the programs as small and as simple as possible!

Best of luck!



Haven't even gotten to the stage of plugging into it yet.  I am just reading the books, copying the code into the editor, just getting used to the feel of the operators, functions, things like that. I wrote a tiny program that calculates how many pills a person on multiple medications should get so they return to the pharmacy in one trip to refill them all at once.

My first firmware project is just going to be uploading pre-written code into a simple MCU that flashes LEDs synched with sound.
12/13/2007 11:33:17 PM EDT
[#35]

Quoted:

Quoted:

Quoted:

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


The Arduino diecimila


Oh wow! I've used the Atmega48/88/168 series (similar?). It's a good chip to learn off of. Programming tiny MCUs is different from programming on a PC. Keep the programs as small and as simple as possible!

Best of luck!



Haven't even gotten to the stage of plugging into it yet.  I am just reading the books, copying the code into the editor, just getting used to the feel of the operators, functions, things like that. I wrote a tiny program that calculates how many pills a person on multiple medications should get so they return to the pharmacy in one trip to refill them all at once.

My first firmware project is just going to be uploading pre-written code into a simple MCU that flashes LEDs synched with sound.


Flashing LEDs is the embedded equivalent of "Hello, World\n"! It's where everybody begins. Most people don't learn programming for the purpose of programming microcontrollers. It's pretty nice to see some people doing it.
12/13/2007 11:43:14 PM EDT
[#36]

Quoted:

Quoted:

Quoted:

Quoted:

Quoted:

Quoted:
I am trying to teach myself C, to program microcontrollers.


What MCU are you learning on?


The Arduino diecimila


Oh wow! I've used the Atmega48/88/168 series (similar?). It's a good chip to learn off of. Programming tiny MCUs is different from programming on a PC. Keep the programs as small and as simple as possible!

Best of luck!



Haven't even gotten to the stage of plugging into it yet.  I am just reading the books, copying the code into the editor, just getting used to the feel of the operators, functions, things like that. I wrote a tiny program that calculates how many pills a person on multiple medications should get so they return to the pharmacy in one trip to refill them all at once.

My first firmware project is just going to be uploading pre-written code into a simple MCU that flashes LEDs synched with sound.


Flashing LEDs is the embedded equivalent of "Hello, World\n"! It's where everybody begins. Most people don't learn programming for the purpose of programming microcontrollers. It's pretty nice to see some people doing it.


Nice to know there's someone on Arfkom I can ask questions to
12/14/2007 12:12:18 AM EDT
[#37]
C++ is easy. I just finished a class in C++. There are a ton of websites to help you with code.

When you are studying a language, I recommend you do twice the amount of assigned work. It helps you pick the language up much faster. Write programs on your own for fun, try problems that are posed on the internet.
12/14/2007 12:16:16 AM EDT
[#38]

Quoted:

Quoted:
//C++ is a good language.  Much better than Fortran.

//It is also a fairly common language and job opportunities are vast for C++ programmers.

//I tend to think that all good programmers are mathematicians and can express ideas as mathematical expressions (algorithms).

//Bad programmers are "scripter kiddies" that cant visualize algorithms, they lack the maths.  Their brains dont have a #include math.h


for (x=0;x<=1;++x) {
cout << showpos << x << endl;







Subnet where is your function prototype?

Real programmers make their own header files....

C++ isn't that great for math, anyways.
12/14/2007 3:58:41 AM EDT
[#39]

Quoted:
Nice to know there's someone on Arfkom I can ask questions to


Sure thing.
12/14/2007 4:12:53 AM EDT
[#40]

Quoted:
C++ isn't that great for math, anyways.


I beg to differ. By itself, sure. But you can write your own library and define your own operators.

Imagine a library that can seamlessly handle the set of all operations on real and complex numbers. It's been done before. A virtual class for all numbers, definitions for reals and complex, and overloaded operators defining the proper behavior. I don't know too many languages, but this is the only one I know of that lets you redefine operators for a class.

Once you write your library, the rest is gravy.
12/14/2007 4:20:09 AM EDT
[#41]

Quoted:
Programming concepts are universal.


I beg to differ.  Going from straight procedural language (like Fortran 77) to an object oriented language is a big conceptual step (assuming that you actually want to use the language to its fullest).  Of course, you can write Fortran-esque code in C++ and get it to run, but it's not really C++.
12/14/2007 4:21:57 AM EDT
[#42]

Quoted:

Quoted:
Programming concepts are universal.


I beg to differ.  Going from straight procedural language (like Fortran 77) to an object oriented language is a big conceptual step (assuming that you actually want to use the language to its fullest).  Of course, you can write Fortran-esque code in C++ and get it to run, but it's not really C++.


I'd agree. OOP is it's own thing, but after that, you can pretty much pick up anything. Then you too can get pissed off that multiple inheritence isn't supported, or you can't do operator overloading, or...
12/14/2007 4:36:41 AM EDT
[#43]
I remember in the early 90's taking a C++ class and I did very good.  That was the first and only "programing" class I took.  The Prof. (also head of the Computer Science Department) wanted me to change my major, but I had other plans.  

I found the programing to be very easy to understand, once you got into it.  I also found it was very functional.  

Mike


PS: The whole class had to buy new $95 books and were told the bookstore would not buy them back since the class was going to be dropped because the programming was not going to be used any longer.  They were wrong.  I have seen a lot of discussion about C++ since.
12/14/2007 4:44:27 AM EDT
[#44]
It depends on how they teach it and how your mind works.  If they teach traditional step-by-step (calculator) based programming and you are good with math skills in your head and logically steps it will be easy.

But if they are teaching Object Oriented programming which this is the ended design purpose of the lastest versions of C++ and C#, some people find object oriented very difficult.  It is a separation of form and function.  Most people with an engineering mind find it difficult to think in that way.

Either way the language itself is easy for most applications.  It only gets difficult with the use of the millions of complicated built-in add-ons that are out there.
12/14/2007 10:52:10 AM EDT
[#45]

Quoted:
This will probably be your first example:

#include <iostream.h>

main()
{
   cout << "Hello World!";
   return 0;
}


and if that's what they teach you, find a new school.

#include <iostream>

int main()
{
   cout << "Hello World!";
   return 0;
}
12/14/2007 11:00:46 AM EDT
[#46]

Quoted:

Quoted:
C++ isn't that great for math, anyways.


I beg to differ. By itself, sure. But you can write your own library and define your own operators.

Imagine a library that can seamlessly handle the set of all operations on real and complex numbers. It's been done before. A virtual class for all numbers, definitions for reals and complex, and overloaded operators defining the proper behavior. I don't know too many languages, but this is the only one I know of that lets you redefine operators for a class.

Once you write your library, the rest is gravy.



C# and vb.net support operator overloading also.  I've never needed to do it, but its supported.
12/14/2007 11:01:09 AM EDT
[#47]
I can program assembly for motorola 68HC11 and 12 chips as well. Used to do C++ and occasionally muck around in C. Usually use PERL now.

-Foxxz
12/14/2007 4:23:12 PM EDT
[#48]

Quoted:

Quoted:
This will probably be your first example:

#include <iostream.h>

main()
{
   cout << "Hello World!";
   return 0;
}


and if that's what they teach you, find a new school.



#include <iostream>

int main(int argc, char **argv)
{
   std::cout << "Hello World!" << std::endl;
   return 0;
}