thanks for all the help guys, i think i understand it. this stuff is confusing :confused:
Type: Posts; User: faze
thanks for all the help guys, i think i understand it. this stuff is confusing :confused:
so what if i have the situation like this?
class Base
{
public:
virtual void f1()
{
f2(); // static binding
hey, can you guys check this over for me and tell me if i got it right?
class Base
{
public:
virtual void f1()
{
f2(); // static binding, because f2 is static
would everyone agree with these?
a)
The dont repeat yourself method, most people interpret it as, simply put, dont duplicate code. if you use subroutines you can reuse them later in bigger...
hey,
I dont seem to see much information out there on the principles in c++. I was woundering if anyone could give me a little info, or post a link where i could find out some info about the...
let me see if i understand this.
so the this pointer is always a constant pointer(because it points to itself). but wether its a constant pointer to a constant object is dependant upon that const...
did u include stdlib.h?
it could be an object of some class. it could be a typedef... you gotta look through the code and find first use or declaration, that should tell you more.
yea, theres alot of those, i kina lucked out... i was always facinated by C and after a bunch of tutorials i thought i was good at it. then i took the class in college and realized how much i...
try system(sleep x); (stdlib.h)
or the regular sleep(); (cant remember which header)
but on non win systems... you can take advantage of the build in sleep function.
Im taking an oop class. In oop depending on if its on the stack or the heap we treat them very differently... im not sure if you did or not, but dont take my post offensively, it wasnt ment that way....
ok im not real clear on the "this" self pointer thing... and im not sure if anyone has ever tried to google for this and self pointer... but it doesnt exactly show what im looking for.
is there...
well theres quite a few different kinds of loops. sometimes wed have wierd projects... and would require it to run once, but depending on some argument wed have to run a certain ammount of times. for...
Actually, no, when you type "*ptr = new int "
your allocating space on the heap as opposed to the stack. And *ptr is your pointer to the space on the heap that you allocated. You type int to tell it...
i cant change main.cpp... thats the assignment! unless there is some way to make the comp1(new Memory(256)); into a reference but as i recall that returns a pointer. i got confused and deleted alot...
ok this is for an object oriented programming class.
i have 5 files
Main.cpp (which i cant modify)
computer.cpp (implementation of computer.h)
computer.h (interface for computer.cpp)...
look at it like this...
persay you have an interger that should not be less than 10. here is an example of using return 1; to figure it out...
you have a function defintion
definition of...