Re: ResearchGate
Posted by Skywise on December 25, 2013 at 16:08:09:

"The problem with C is weird syntax and lack of error checking."

The syntax is a bit weird. But surprisingly I'm catching on quickly. It could be that another scripting language I used to use all the time used the same syntax structure.


"TB won't let you make an incorrect statement..."

The IDE I'm using is quite happy to tell me all the incorrect statements I've made.

"... whereas C will cheerfully let you walk off a cliff as the saying goes."

The errors that you can make in C seem to be due the fact that C is closer to the CPU than higher level languages. In machine code, you can go writing memory willy-nilly all day, but beware the consequences. It's up to you to make sure you only write to where you need to and no where else.

C reflects that. It is up to the programmer to NOT write 20 variables to an array when there's only supposed to be 10.

However, C++ has some new constructs that help quite a bit. For a specific example, plain old C doesn't have a true STRING type, but are instead arrays of CHARacter types. C++ has a STRING type.

So far one of my biggest challenges in translating in my head form BASIC-like to C++ has been handling strings. There are MANY ways of doing strings in C/C++ whereas in BASIC, there's one. What it really means is that there's more tools in the toolbox, is all.

Right now I'm trying to do Windows GUI stuff. Having issues getting the GUI toolkit to work.

Brian