You need to initialize it in constructor. Here you've to declare it only.
Type: Posts; User: AdnanShaheen
You need to initialize it in constructor. Here you've to declare it only.
In order to make your
int* trand(const int x) code work. You also need to
trand(len); send a constant "len".
Here you are not using "len" as constant, but you can cast it.
Come on guys, don't put your home work here please.
Make your code like "int * trand(const int x)"
Did you try running your program? I hope if you did, you'll get some weird behavior.
The reason for this warning is, you have not initialized your struct variable Files.
But there will be more...
no thanks
Try to read the help. According to warnings, printf() takes void*, where as you are providing it int.
I hope you have some knowledge of pointers. ptrA is a pointer, and *ptrA is value pointer is...
Ritly said by quzah, depending on your compiler, that value can be 0 (or some other garbage value out of program memory), which means NULL. So attempting pointer which is not valid.
Where is MyDll?
If it is your dll, then you must load the dll, if you have not loaded it statically, you'll need to use LoadLibrary() to load it dynamically, and then use GetProcAddress() to get...
For details on versions. OSVERSIONINFOEX Structure (Windows)
No you are wrong, keep googling
Why are you not reading book?
Your foodpositions is an array of position. It is not a container.
Read something on STL, you will get some idea about containers, and iterators
You have come up with this, because you don't know anything about iterators.
Secondly, your "prog" must be defined somewhere.
I would say, please refer to your books to fix your problem, and have...
Well I would suggest to read your book.
For pointers (*) they are allocated at run time i.e. dynamically. We use "->" for it.
Try to read your book, on inheritance, overloading and overriding.
You are using DOT thats causing you problem. Since you created "respmsg" dynamically. So you'd need "->" to use its members.
You can, if you want. Obviously you're using it in other methods.
What is foodpositions_[5]???
Your "i" is declared anywhere?
what is foodpositions_[0]???
If you do not allocate memory, your inputFile[nIndex] = line will come in action. Obviously which is once allocated, and inputFile[nIndex] will point to line. Last time your "line" have let say...
Do you initialize your char* inputFile[19] like this?
If yes, can you please think on it, where it is pointing?
Ok let me tell you, first you have to create memory for char* inputFile[19]...
Can you post all of your code here? I will examine it
Have you initialized your "char * inputFile[19];"?
Seems no, that is why you're getting segfault now.
Initialize inputFile.
Read data.
Copy read data to inputFile
Print it.
It compiled ok, but it is giving your wrong result. Try using proper string copy function.
Use double pointer to int (int** pMatrix) to solve your problem. You have to create array and then array on each item of array.
I hope you will write it, hint is enough.
This is really an assignment from class :-)
Any how I hope the problem was fixed.
inputFile[i] = line // This line is problem. Use proper copying of string.