Search:
Type: Posts; User: StGuru
Search:
Search took 0.13 seconds.
-
August 11th, 2009, 03:54 AM
Aah, I understand now. Thank you very much.
So the dynamic memory is used while the program is running, and I can delete it before the program ends, so while system("pause") is keeping the program...
-
August 10th, 2009, 05:34 PM
Thanks for the reply.
Because its the end of the program. How the compiler know to delete the memory for other variables for example?
-
August 10th, 2009, 04:55 PM
Hi!
I want to ask you why when I write something in file it deletes everything inside.
For ex.
#include <iostream>
#include <fstream>
-
Thanks for the replies.
So &* makes no sense, right?
And why I need to delete it? Doesn't it deletes automatically?
-
Oh.. I missed that. Thank you very much.
Why my program is not working perfectly?
Also is it same *& and &* ??
-
Hello! I need help about this problem. I got 4 class, one base class 'Vozilo' (Vehicle), and derived classes 'Avtobus' (Autobus), 'Avtomobil' (Car), 'Kamion' (Truck).
#include<iostream>...
-
Thank you very much for the help.
Yes I missed Copier (1,2,3) while copying the whole code.
But in the first post with the keyword "virtual" there is not normal inheritance since the first object...
-
Thanks for the replies. It really helped me.
I got few questions more:
Does the constructor allocates memory for the object of the class?
For example. (if normal inheritance rules apply) :
...
-
Thanks for the replies.
So constructor do allocate memory for objects right?
In this case the PoweredDevice is created by Copier directly, and then Scanner and Printer inherit the members...
-
Hello!
I got few things that I do not understand about virtual bases.
I got this code:
class PoweredDevice
{
public:
-
Does it mean that the compiler does not create copy for the returning object since it already been copied (before passed by value as a parameter to a function and copy constructor called)?
-
I expect the copy constructor to be called three times, but its called 2 times. Why?
-
Thanks for the suggestions. Here is the code:
#include <iostream>
using namespace std;
class test
{
int c;
-
Actually, you're right. I misunderstood the terms 'copy' and 'create' :-).
I got an interesting problem.
test func(test object)
{
return object;
}
test ob=func(ob1);
-
June 30th, 2009, 11:30 AM
Here is the code that I worked with:
#include <iostream>
using namespace std;
class test
-
June 30th, 2009, 10:21 AM
I was doing a little research and find out when:
I - When an object is created from another object of the same type if I define the copy constructor as (for ex. test ob=ob1):
test(const test...
-
June 29th, 2009, 04:45 AM
I noticed when I put class izvedena : public osnovna then the protected member test becomes again protected, but if I put private it becomes private inside the inherited class.
-
June 28th, 2009, 02:37 PM
-
June 28th, 2009, 01:40 PM
They are not accessible by any possible way? Is there any way that I can access them?
-
June 28th, 2009, 12:42 PM
Thanks for the replies. And why when I put protected it works? Is it inherited like protected member?
I got another question. Why the inherited class does not inherit the private members of the...
-
June 28th, 2009, 11:56 AM
I got one question about protected members.
Here is the code:
#include <iostream>
using namespace std;
class osnovna
{
-
thanks for the reply laserlight. Usually when I go out of bond at some array, I got 13423432 number for the variable. In this case perfectly works, which is strange. Anyway, how to use that vector...
-
Ok, thank you. And you mean that by not defining how many objects should be used (pokazuvac=new objekat[20]) there could be memory overflow?? I think the compiler should prevent this stuff.
-
What is heap? Is it a large pool of unused memory ?
-
I got one code:
#include <iostream>
using namespace std;
class objekat
{
int test;
|
Click Here to Expand Forum to Full Width
|