I’ve been tasked to create a program that takes a text file that contains a list of programs as input. It then needs to run valgrind on the programs (one at a time) until valgrind ends or until the program hits a max allotted time. I have the program doing everything I need it to do EXCEPT it isn’t waiting
Tag: c++
Convert char array of C into string of C++
I need to convert char array of C into string c++ but the char array is an element of struct. Code: This is my Structure in C and I want to access name[50] in c++ but for that I have to convert it into string. I have tried strcpy and memcpy. I am using ESL_BOOL status; and it is working
Pass array to C# from C++ via mono
I need to pass an array from C++ to C# using mono. But I can’t get mono_array_set() to compile. So how can I pass an array from C++ to C#? I’ve tried mono_runtime_invoke() which compiles but gives a runtime error. Answer This works:
Using makefile, LD_PRELOAD to executable file
I have two files, “abc.c” and “run” and I want to make a executable binary file which perform below two intstructions I tried to use makefile in linux, but failed. Can I use makefile to make executable binary file ? Answer Ideally, makefile should be used for compilation. For automating the shell commands, you can use a shell script. Maybe,
Linux C++ Dynamic Libs and static initialization order
Forgive me on the long post. Its a complicate problem I wanted a complete description. On Linux Fedora 21 (g++ 4.9.2) and like. I’m working on a C++ database wrapper library using a base class of “database” and inherited classes of Oracle and Sybase. Beyond that, I wanted some of the programs to be able to dynamically load the libraries
What is the systematic way when I want my code (client and server ) work on various scenarios?
I developed in on 64-bit MAC. And I wish it would work under two scenarios: 64 bit server and 64 bit client 32 bit server and 64 bit client ONLY DEALING *NIX NOW Between the communication of server A and client B, I would exchange a linked list of struct, which is of the following type: both size of char
What counts as a symbol while mangling C++ names on Linux?
On Linux g++/clang++ is mangled as _Z10test10058lPFPvS_EPFS_PKvEPFS3_S_E According to g++/clang++, how many symbols are there in this function definition ? What are the substitutions ? (S_, S0_, S1_, …) More specifically what is S3_ ? (edit – adding some context) The D language allows to interact with C++ by declaring symbols as extern(C++). Unfortunately the current implementation is not always
C: Trying to implement unnamed pipes
I’m trying to make a program that simlutates the terminal’s nameless pipes. For example, if I want to run the command: ls –l | grep ‘10’ would be: ./pipes ls -l – grep ’10’ (I use – instead of |). However, my program doesn’t work because execvp fails (bad adress). This seems impossible to me. What am I doing wrong?
How to write to data register in C, without touching previous writes?
Iam a beginner in C and have this scenario: I can successfully write to a gpio port with data register 0x103 and direction register 0x95. If I want to write to another pin I have to “overwrite” the previously pin. As if I first write 00010000 and then want to make another pin high I need to write 00010001 to
SO_RCVTIME and SO_RCVTIMEO not affecting Boost.Asio operations
Below is my code When I use Telnet to connect, but not sending data, it does not disconnect from a Telnet timeout.Will need to do to make setsockopt kick in? Thanks! I have modified SO_RCVTIMEO to SO_SNDTIMEO. Still unable to timeout in the specified time Answer Using SO_RCVTIMEO and SO_SNDTIMEO socket options with Boost.Asio will rarely produce the desired behavior.