10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I'm doing aproximation of derivative called five-point stencil. For every value of x, in interval , in step... (0 Replies)
Discussion started by: antonija
Currently I test a shared library vendor provided in linux , the following is the simple source :
using namespace std;
extern int test1();
extern int test2();
cout << "hello world" << endl ;
return 0 ;
cout << "Test 1" << endl;
... (6 Replies)
Discussion started by: barfatchen
I am facing a problem of memory corruption. The loop runs for the first time but does not go through the second time. What could be the problem?
/*do something which reads this file into a 2D array*/
... (10 Replies)
Discussion started by: dare
while executing the below code, am getting *** glibc detected *** ./ok: malloc(): memory corruption (fast) error, please suggest how to solve this issue.
/* Define constants for VARCHAR... (2 Replies)
Discussion started by: mpjobsrch
Hi guys, I'm trying to understand pointers in C and made a simple example and I've problems with It.
Can someone help?
int f1(char **str_);
int main(int argc, char **argv)
char *str = NULL;
... (3 Replies)
Discussion started by: pharaoh
In a well-known book on the C language, there is an example of an efficient method for using a struct member as an argument to a function. (I'm a C noob, but I believe the correct terminology might be: use call-by-reference instead of call-by-value.) The function is printf.
Anyway, here's a... (5 Replies)
Discussion started by: uiop44
7. Homework & Coursework Questions
Hi, i'm trying to copy a struct into a binary file using the unix instruction write, so i declare and fill the struct "superbloque" in one function "initSB" and then i pass the pointer to another function called bwrite (for block write) which calls write. The problem is that i call the function... (2 Replies)
Discussion started by: ignatius3
8. Homework & Coursework Questions
My latest assignment (practice not coursework!) is to write prototype interactive exam/test console application. I've used structs to store the question information (not sure if this was the best way to do it?) and I have the following code that outputs each question and it's possible... (0 Replies)
Discussion started by: pondlife
when i try to use the class i wrote, i either get this:
*** glibc detected *** double free or corruption: 0x40236ff4 ***
and the proccess exits with an error code of 0;
or it segfaults. could someone look at my header file (with imp.) to give me some insight as to why its not working?
... (19 Replies)
Discussion started by: norsk hedensk
I have made a small C program that make use of malloc and free for processing bitmap images. when i try to run the program, I am getting a error something like
*** glibc detected *** free(): invalid next size (normal): 0x0000000000503e70 ***
I am not sure of which free() is causing this... (1 Reply)
Discussion started by: vbreddy