Friday 22 November 2013

C++

If I wake up screaming tonight, it's because I have been programming C++ all day. I can see that it is a powerful programming language, but if you are not used to it, it just gives you a headache (and nightmares...).

Maybe I should try to understand how pointers work and not just put * and & signs at random until it compiles. That may make things easier ...

2 comments:

STH said...

Yeah, there's really no point to programming in C or C++ if you don't understand pointers. It took me about a year of programming before I was really comfortable with them. And part of the problem is that the syntax is pretty bad. But don't give up, because when you understand pointers, your programs will be way more efficient. I once rewrote a program another computational chemist had written in Fortran using C, and in the process I changed his algorithm from arrays and loops to pointer-based graph traversal. It used 20% of the memory and ran more than 1000 times faster.

Felix said...

Yes, it's getting better :) I just had to sit back and read the manual ...