|
|
There is nothing to hate about C++. C++ doesn't written for winning prize for "Standards". It came to solve real world problem and solving it very well, since long time.
Happy Programming
|
|
|
|
|
As a C/C++ coder who started as a .NET coder, I hated C++ to start with. I can honestly say that over the last few years it has really grown on me. I am forced to agree that a well-done c++ application is a thing of beauty. I am still more productive using .Net though, as it generally requires less code to get stuff done.
|
|
|
|
|
If you wanted to teach a monkey how to code you wouldn't use C/C++.
You'd use VB or C#
|
|
|
|
|
code_junkie wrote: If you wanted to teach a monkey how to code... Is that right after it writes out the entire works of Shakespeare on a typewriter?
Uhh, do you know what a typewriter is?
|
|
|
|
|
That's nothing. It happened to me twice, in different environments (one using MSVC and one using gcc): the binary runs flawlessly when compiled in debug mode, and fails highly reproductibly when compiled in optimized mode. Both times the culprit was some smartass programmer who controlled what code gets compiled depending on build type in some libraries.
|
|
|
|
|
I can sympathize (in terms of trying to find some elusive “error”).
The other day, I could not compile a new C# COM server I was building … kept getting errors like: “expecting this …” or “expecting that …”. I counted brackets; braces; everything lined up, but it still wouldn’t compile. (I should mention that some of the code was copied from MSDN).
So, I started refactoring. If I typed it out, it would compile; if I copied and pasted snippets, the compile would fail.
In the end, it turned out to be a “subtract” (i.e. “ - “) in a math statement.
The code I had copied contained an “unprintable” character after the “-“ (which happened to be at the end of a line due to a copied MSDN statement that spanned multiple lines) … retyping the “-“ made the problem go away. You could only “see” the problem if you hit “End” on that particular line because the cursor would land over one extra position.
|
|
|
|
|
When 19 people (at least until now) vote you 1 it's time to accept you are either mistaken or plain different.
What you are doing is to blame a language for problems that are caused maybe by a compiler, the way you wrote the code, 3rd party library, ... . I bet you don't hate C++ but the whole set of tools that you are using to write code in C++. Then to talk back to people when you don't seem to know about release and debug versions it doesn't look well.
I hate a tiny bit C++ but I hate it for what really belongs to it: the "*", the "&" and the "->". It is brutal to understand C++ code sometimes. That's why C# came as a blessing for me.
Stop being frustrated and revisit your code, you'll make it better and learn in the process.
Cheers.
giuchici
|
|
|
|
|
|
Would it not be a real horror to let the poor thread really sleep for one minute (= 0,00000134 dog years or 250000 processor years)?
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
I like the measure microfortnight personally.
|
|
|
|
|
Every day, I work a micromillenium.
Just think of it as evolution in action.
|
|
|
|
|
|
Perhaps the application is designed for use deep in a gravity well?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Most have been up to today. At least as welly as our planet can make it
At least artificial intelligence already is superior to natural stupidity
|
|
|
|
|
That would work, because the people inside the gravity well would experience the passage of time normally. Only an outside observer would see time passing by slower inside the gravity well.
|
|
|
|
|
Grrr....you beat me to the punch line!
|
|
|
|
|
The comment has been truncated. I think it originally read
Thread.Sleep(3000);
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Optimisation opportunity? I've heard stories of people leaving those in so they can present a 'quick win' when they're under pressure.
|
|
|
|
|
Yep, it was here on CP. A "performance loop" it was call or sth like this (for int i=0;i<10000000;i++)
Greetings - Jacek
|
|
|
|
|
Pascal Ganaye wrote: Thread.Sleep(3000); just a tick!
FTFY, no, wait, that's not right either!
|
|
|
|
|
|
Ah, I remember writing that when I wrote Sim City. Of course, Sim time is different than our time. A side effect of reticulated splines.
|
|
|
|
|
What is... thread synchronization for dummies?
|
|
|
|
|
That looks more like three shakes of a lamb's tail.
|
|
|
|