Skip to content

Tag: c++

C close() : Invalid argument

Sorry per advance for my english, i’m not english native and be indulgent i’m also a student. I’m trying to recreate the pipe function in C, but i have a problem when i try to close pipe fd before the dup2(), the function close() return me an error Ïnvalid argument, i have already check if m…

A c program file on linux became green and now I cannot edit it

Hi I have a c file in program which is called helloQV.c I ran the command gcc -Wall -ansi -std=c99 helloQV.c -o helloQV.c but now I cannot edit the file helloQV.c, when I open the file in vim it turns out to be just a bunch of random symbols. I realized I should have named the -o HelloQV.c to something

Stringizing / stringify name mangling

I load a path name with cmake and want to use as a string in my C++ program to load some data. For this the stringification operator # is really handy – I use the macro provided in this answer which is the same as here. Now when I have “linux” or “unix” in my path, this goes horr…

OpenMP Matrix Multiplication Issues

I am trying to multiple the values of a matrix. I have both a parallel and sync version. But the parallel version is longer than the sync version. Current the sync takes around 90 seconds and the parallel over 100. Which makes no sense to me. My logic was to split the matrix into 4 parts from the first 4