gcc -g :what will happen

That’s kind of right, but incomplete. -g requests that the compiler and linker generate and retain source-level debugging/symbol information in the executable itself. If… the program happens to later crash and produce a core file (which suggests some problem in the actual code), or a deliberate OS command forced it to core (e.g. kill -SIGQUIT pid), or the program … Read more

C++ discards qualifiers

I have this error: BSPArduino.cpp:316: error: passing ‘const BSPArduino’ as ‘this’ argument of ‘virtual void BSPArduino::enableWdt(const WATCHDOG_TIMER_DELAY&, const ___bool&)’ discards qualifiers This method is define like that: I want to call it like that: With: I don’t understand why this build error… Thank you so much for your help Anthony

plotting package for c++

I again would recommend gnuplot. If you don’t want to use it then I liked plplot when I used it: http://plplot.sourceforge.net/ . The canvas to plplot can be put into gtk+ frame too if you want to add buttons to your plot. That said, I returned to gnuplot before too long.

What is a null-terminated string?

A null-terminated string is a contiguous sequence of characters, the last one of which has the binary bit pattern all zeros. I’m not sure what you mean by a “usual string”, but if you mean std::string, then a std::string is not required (until C++11) to be contiguous, and is not required to have a terminator. Also, a std::string‘s string … Read more

OpenMP set_num_threads() is not working

Besides calling omp_get_num_threads() outside of the parallel region in your case, calling omp_set_num_threads() still doesn’t guarantee that the OpenMP runtime will use exactly the specified number of threads. omp_set_num_threads() is used to override the value of the environment variable OMP_NUM_THREADS and they both control the upper limit of the size of the thread team that … Read more

C++ ostream and ofstream conversions

Yes, you can. That’s the point in the OO concept called subtype polymorphism. Since ofstream derives from ostream, every instance of ofstream is at the same time an instance of ostream too (conceptually). So you can use it wherever an instance of ostream is expected.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)