User Profile
Collapse
-
can you elaborate the question? This might help everyone to understand your need. -
-
by the way you should be having f=n*factorial(n-1); instead of f=n*factorial(-n);Leave a comment:
-
-
weaknessforcats :- Thats why i had given an hint to sweya by saying i am using s3(s1+s2),
Probably she didnt get my hint.Leave a comment:
-
can you overload = and see once, cause i am using
string s3(s1+s2) and it works wellLeave a comment:
-
arrays needs to deleted using delete[]ptr. But your trying to delete using delete ptrLeave a comment:
-
-
In your function operator +, your returning "pass by value", this result in deletion of your object as soon as your function returns.Leave a comment:
-
One thing to rember, when you declare a structure, you should think it as a new data type.
Struct SomeStruct{
int data1;
int data2
};
Now SomeStruct is a data type, just like int or float.
You dont do something like float a;
float = 10;
You need to modify the variables, not the data type.
Similarly in your code you need to modify your variable(mystat s) and not the...Leave a comment:
-
Probably you have already freed that piece of memory. Now most of the implementation of malloc or modern day os are sophisticated enough that it would take back all memory allocated to your program. If i am wrong some body please do let me know. It would more easier to diagnose if you could put your code here...Leave a comment:
-
Can you post more code from your file. What do you mean by joining two rooms??...Leave a comment:
-
Where are you struck?? Do you want to know how to start or you are struck at some place??Leave a comment:
-
-
As such C doesnt provide any functions to implement graphics. But there are certain libraries which could be used to achieve this. You can have look at graphics in turbo c or kde programming....Leave a comment:
-
-
There are many uses of static functions and variables in c++. Static variables are used in monostate patterns, in which all the instance of a class needs to refer to same variable.
Static functions are used in singleton pattern and there is a good article in this forum by weaknessforcats .
http://www.thescripts.com/forum/thread656124.html
Other uses are passing function pointers to a system call or function written in...Leave a comment:
-
clrscr is declared in conio.h and thats not included. Anyways whats the problem?? clrscr is not standard function, probably thats why you are not able to compile. (If compilations is the problem :^) )...Leave a comment:
-
Yes you are right. Printing in linux is implemented in such a way that nothing is printed till it encounters some special characters like '\n' or till program is about to terminate.
Once it is passed to stdin, buffer is cleared. But this buffer is also part of your address space so when you fork even this buffer is copied. Resulting in printing Hi twice....Leave a comment:
-
Can you post the kernel version your are using.
Can you post the output of this command
$ Uname -r
If you are using kenel 2.6 this is not the way to build modules.
Have a look at understanding linux device drivers book for more details of building the mofule. In 2.6.x kernels module linkage is done by kernel and it would be something like hello.ko and not hello.o...Leave a comment:
No activity results to display
Show More
Leave a comment: