Skip to content
Advertisement

Tag: c++

What does the output of this program means?

I am trying to get the maximum virtual memory of the current process in Linux. And I am using getrlimit() I get -1 in both values. Shouldn’t I expect the virtual memory max allowed for the current process ? Answer The value RLIM_INFINITY denotes no limit on a resource (both in the structure returned by getrlimit() and in the structure

linux – serial port programming ( ASCII to Byte )

I tried to receive data from serial port. However, those data is unrecognized to me. The root cause is because those are in ASCII. To decode the data, it needs to be the byte formate. The buffer I’ve created is unsigned char [255] and I try to print out the data by using Two questions here: The data might is

Detect if a remote computer is Windows or Linux OS

I have IP Address and Server name of a remote computer. I am able to query WMI to get the OS version if the computer is running Windows but is there a way i can query the remote computer and get the OS version if the computer is not running Windows (Linux, Solaris)? Answer I guess Active Directory is going

When using the GCC driver, what makes a static lib “incompatible”?

So what I am trying to do is on Ubuntu 14.04 (x86_64) I want to set up musl-libc based on the latest released 1.1.11 version which is available at this moment. What I did was to: Install multilib support for GCC: sudo apt-get –no-install-recommends install gcc-multilib Configure the libraries for 32-bit and 64-bit respectively and install them into separate folders:

fgets return less characters

I’m writing an assembly program for practice. The assembly program uses the c library functions. I’m concern in particular with fgets() function. The fgets manual page states: I have declared a buffer of 1024 bytes and used it in the fgets funtion to read text from a file. But the program is returning 1019 characters. It always seem to return

Advertisement