Thanks, I got it.
Type: Posts; User: OCcounty
Thanks, I got it.
Difference between int* and int * and for that matter char* and char *?Does it make any difference...
Well thanks for your replies.
I would like discuss this further..
So static variables in class,are being shared among the different objects for that class.
Static variables in general are being...
Difference between static variable and global variable in C++?
Hello,
I have a question regarding following code. It is overloading plus (+) operator.
#include <iostream>
using namespace std;
class CVector {
public:
int x,y;
Hello claudiu,
I would be interested in joining the developer's group and have joined the forum at SourceForge.net.
Looking forward to be of some help to the team..
occounty.
Yeah that worked. Thanks..
Thanks for your responses. I tried following thing, but does not seems to be working either.
#include <iostream.h>
using namespace std;
int main(int argc, char **argv)
{
Hello,
I am using Codelite compiler Version: V2.7.0.4375 (latest) and trying to compile a simple hello world program:
#include <stdio.h>
int main(int argc, char **argv)
{
cout << "Hello...
append(head, num). So append has head of an initialized linked list and num which would scaned and passed to append. So all arguments are initialized. And I have tried using void and list is not...
Here is the snippet which works fine.
My question now is the function append does not work with void return type. It works fine with a dummy return variable of an int. Any clue why is this...
I agree last free is not necessary.
I think it is necessary since the while loop is curr != NULL, so it is not going to free the last member with curr->next =NULL.
This works :
curr = head;
while(curr!= NULL)
{
temp =curr->next;
free(curr);
curr = temp;
Do you mean something like this:
curr =head;
while(curr!= NULL)
{
curr =curr->next;
free(curr);
}
Thanks for your help so far...
Using *p I am trying to reach the end of the linked list. So should I construct an linked list and then try to append it?
But if I try to execute this program I get "Program Received signal SIGTRAP" warnig and I do not get any output?
So my question is, should I apply another loop to free the memory, I mean some...
I tried with this function. For some reason, void with append is not working. I tried using an int return type. Well this works but now I am receiving "SIGSEGV" at the statement: q->link = temp; in...
If I try to free memory as in shown in the snippet, I get warning stating "Invalid Address specified to RtlFreeHeap" and "Program Received signal SIGTRAP".
Can anybody suggest correct way of...
I do get warnings but I am not getting any of them now!!
No compiler gives 0 errors and 0 warnings. It is during the run I encounter this error.
I stated the return type for append() and after that I do not receive any SIGSEGV error. Now the output...
Compiler gives the error"Program Received signal SIGSEGV".
I did not understand. Can you explain in details ? Please.
I did not understand. Can you explain in details ? Please.
In above snippet, I am receiving signal SIGSEGV at lines:
1. append(p,num);
2. r = *q;