I have a C program that computes the page fault service time in C. For this program I have 2 large files (of less than 3GB each – almost the size of the RAM) I get the following compiler warnings: When I run it with the command I get the error What does the code do? We map both the
Tag: c++
Connection refused – tcp socket in linux [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 7 years ago. Improve this question Ok, first how to run my program: my server How to compile? server:
Need help Combining two C codes
My goal is to write a program that reads up to 100 characters from an input sentence, then from that stored data it will output 3 things. The reverse of that input sentence, the odd-numbered elements of the array, and even-numbered elements of the array. Therefore I have 3 printf functions. I have 2 separate codes to do this and
Calling Assembly code from C++
I’m trying to write my own I/O library, so the first step is just being able to output a character. So far, this only needs to work on Linux. I wrote what I believe to be a solid _putc: label in x86 (with Intel syntax), and I put it in “io.h”, then called it from my main file, “test.cpp”. Here’s
Replacement for MS vsprintf_s on Linux?
I’m converting C++ code from Windows to work under Linux and I came across this function “vsprintf_s”. It is a Microsoft specific function so I would like to ask if there is a replacement in Linux? Thanks Answer Looks like vsnprintf() would be a suitable replacement according to linux.die.net.
C – list all files in current directory then move in directory above, list files, and so on until root directory is reached [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 7 years ago. Improve this question Could you help me please to develop a program in C that scans the current directory and displays the names
How to Accept Standard Input in C from the Linux Command Line
I am trying to accept a string from the standard input in Linux, take the given string and change the ‘A'(s) and ‘a'(s) to ‘@’, and output the altered string. In linux I am running this: echo “This problem is an EASY one” | ./a2at My a2at.c program contains this: Any help would be really appreciated! I know that I
dynamic linker error with rand() function
I already asked a question about this before but with reference to the following code again Why does compiling this result in the following error Why would this happen? How does the linker know that this is just another rand() function I have declared myself but rather an existing version of rand()? Answer One of your header files (<iostream> in
How can I LD_PRELOAD my own compiled library?
I was wondering how this works, creating a library and preloading it so a program can use it instead of the one in the include statement. here is what I am doing and is not working so far . Then in the terminal: and finally which doesnt print 33, just random numbers… Answer Your programs are C programs, but the
Garbage characters during decryption with memcpy on OpenSUSE 13.2
I have a program that for some time now under SUSE Linux Enterprise Server has worked fine. Recently, it was moved over to an OpenSUSE 13.2 system and a problem was encountered. The program interfaces to a 3rd party and data is received into our program where the data block consists of some header information and AES encrypted data. Using