makefile:4: *** missing separator. Stop

make has a very stupid relationship with tabs. All actions of every rule are identified by tabs. And, no, four spaces don’t make a tab. Only a tab makes a tab. To check, I use the command cat -e -t -v makefile_name. It shows the presence of tabs with ^I and line endings with $. … Read more

Undefined reference to pthread_create in Linux

I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/ But when I compile it on my machine (running Ubuntu Linux 9.04) I get the following error: This doesn’t make any sense to me, because the header includes pthread.h, which should have the pthread_create function. Any ideas what’s going wrong?

Why does ENOENT mean “No such file or directory”?

It’s an abbreviation of Error NO ENTry (or Error NO ENTity), and can actually be used for more than files/directories. It’s abbreviated because C compilers at the dawn of time didn’t support more than 8 characters in symbols.

Floating point exception( core dump

You are getting Floating point exception because Number % i, when i is 0: Just start the loop at i = 2. Since i = 1 in Number % i it always be equal to zero, since Number is a int.

When to use extern “C” in simple words? [duplicate]

You need to use extern “C” in C++ when declaring a function that was implemented/compiled in C. The use of extern “C” tells the compiler/linker to use the C naming and calling conventions, instead of the C++ name mangling and C++ calling conventions that would be used otherwise. For functions provided by other libraries, you will almost never need … Read more

What is newline character — ‘\n’

From the sed man page: Normally, sed cyclically copies a line of input, not including its terminating newline character, into a pattern space, (unless there is something left after a “D” function), applies all of the commands with addresses that select that pattern space, copies the pattern space to the standard output, appending a newline, and deletes … Read more

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