oh wait. How do the Squirrel() been executed when I didnt perform sam->Squirrel() or sam->~Squirrel(). i will continue 2moro as it get night now.thanks.
Type: Posts; User: ncode
oh wait. How do the Squirrel() been executed when I didnt perform sam->Squirrel() or sam->~Squirrel(). i will continue 2moro as it get night now.thanks.
Isn't the output is
Hello!
World!
Because in main() we execute foo() first then later bar(). Am I right?.......
ya i know. But i just cant get it into my head.
I create sam object with squirrel class
inside there are Squirrel and ~Squirrel <-- execute follow sequence
Create sally object with squirrel...
#include <iostream>
using namespace std;
class Walnut
{
public:
int Size;
};
Ok thanks for the advice. At least, i know the truth now. Know i just knew why tech company love to sue each other
Ok. Thanks. Based on your experience, So how long could it be if i develop everything myself from zero. Many startup did it. I dont think i cant
I'm very very curious. I want to develop an online store that are quite similar to Dell. What knowledge do I need. I mean like programming? Php? Database??
thanks guys for the great explanation. Actually there's no big deal
I came across this in my book. Both of them look quite similar.
void fixFlatTire(Car *myCar);
void fixFlatTire(Car &myCar);
The first one pass myCar to function fixFlatTire via a pointer.
The...
Thanks again. Do you type wrong or something......type const Time&. Why & is at the back?
ok thanks, Then again. is const Time &t means - Type time of L-value of T which is a const?
Hi,
I'm a new C++ user. I dont know what does this mean.
void printMilitary( const Time &t ) <---what does Time &t means?
{
cout << ( t.hour < 10 ? "0" : "" ) << t.hour << ":"
<<...
ok it's solved. Probably same problem like the recent one. Anyway thanks everyone.
I tried the file that's created by the author and it work. I paste my code which i type recently into the author project , it work like charm. idk what's happen. I think maybe it's due to header...
I tried #include <string or string.h> and it still not working. Anyway, this chapter isn't focus on "using namespace" and it's on Dividing Between Source-Code Files. So I think it's not very...
Hi. I just came another problem on another tutorial that involved a header. Why I'm getting error again even I copy exactly and I had linked the file properly.
Code 1
#include <iostream>
using...
Thank you. Found the solution. I didn't include them to debug and release. That's why. Thank you.
This's what the book call me to do:
First code
#include <iostream>
using namespace std;
void BigDog(int KibbleCount);
int main(){
Currently I'm following a tutorial on C++ All-in-One for Dummies @PG114 -> Dividing Between Source-Code Files. I'm trying to run a console program that are made up of 2 source file:
main.cpp
...
ok thanks
Thanks!. Just wondering why I cant use if(key.programme == test[0].programme)? Srry if i annoy u.
test[0].programme is assigned with "Hello World". Then I input "Hello World" into key.programme to compare it with test[0].programme but it just never work even it' already same. How can i solve it?...
oo ok thanks. get it. lesson learn.
oh it works. Why we can't directly assign "Hello World" in it? Char* seems working well on this.
Still no hope. incompatible types when assigning to type 'char[20]' from type 'char *'
#include <stdio.h>
#include <stdlib.h>
struct record{
char name[20];
char programme[20];