Re: Function in header file - newbie VC++/CLI
- From: "Jacek" <majly@xxxxxxxxx>
- Date: Tue, 3 Jul 2007 23:48:25 +0200
U¿ytkownik "Duane Hebert" <spoo@xxxxxxxxx> napisa³ w wiadomo¶ci
news:%23d2TeTbvHHA.5104@xxxxxxxxxxxxxxxxxxxxxxx
Thanks for explaination Duane. I'll print your post and hang on the wall to
"Jacek" <majly@xxxxxxxxx> wrote in message
news:f6ecav$bfn$1@xxxxxxxxxxxxxxxxxx
U¿ytkownik "Duane Hebert" <spoo@xxxxxxxxx> napisa³ w wiadomo¶ci
news:uPJp7havHHA.5032@xxxxxxxxxxxxxxxxxxxxxxx
This is my real problem not from book.
"Jacek" <majly@xxxxxxxxx> wrote in message
news:f6e758$f24$1@xxxxxxxxxxxxxxxxxx
Code in above post works good.but in next post with header file don't
work
Sorry for my english ;)
Sorry but I'm not that familliar with c++/cli.
Maybe a link like this:
http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=165&rl=1
What book are you using?
Thanks for reply and link. I have to learn more about this->
No, I'm wondering which book(s) you're using to learn
c++.(or c++/cli) It seems that you're confused about class structure
and member functions etc. Using the this pointer directly
doesn't actually seem to be your problem. You'd get the same
errors anyway. As I said, I don't know c++/cli but the
errors you post seem to be the same as you would get
in c++ with the same code.
Typically, in c++ at any rate, we would use
a header file to declare a class and its members
and a corresponding cpp file to define them. In the
cpp file you refer to the class's functions by using the
class's namespace.
In you case, a sort of example in c++ could be something like
//form1.h
class Form1 {
public:
Form1();
void Status(std::string Message);
};
//form1.cpp
#include "form1.h"
Form1::Form1() {
// whatever in your constructor
}
void Form1::Status(std::string Message) {
Message = "hello world";
//do something here
}
So you declare the class in the header and
do the implementation in the cpp file. Then
you create an instace of it, somewhere and use
it.
remember it ;)
I read several books and many websites but not carefully I think. I learn
c++ just about 3 weeks.
I know your way to construct header . I read about it today and in first
post i try use something like this.
I'll try tommorow resolve this problem .
Thanks for advice.
.
- Follow-Ups:
- Re: Function in header file - newbie VC++/CLI
- From: Duane Hebert
- Re: Function in header file - newbie VC++/CLI
- References:
- Function in header file - newbie VC++/CLI
- From: Jacek
- Re: Function in header file - newbie VC++/CLI
- From: Tom Serface
- Re: Function in header file - newbie VC++/CLI
- From: Duane Hebert
- Re: Function in header file - newbie VC++/CLI
- From: Tom Serface
- Re: Function in header file - newbie VC++/CLI
- From: Jacek
- Re: Function in header file - newbie VC++/CLI
- From: Duane Hebert
- Re: Function in header file - newbie VC++/CLI
- From: Jacek
- Re: Function in header file - newbie VC++/CLI
- From: Duane Hebert
- Function in header file - newbie VC++/CLI
- Prev by Date: Re: Function in header file - newbie VC++/CLI
- Next by Date: user interface design
- Previous by thread: Re: Function in header file - newbie VC++/CLI
- Next by thread: Re: Function in header file - newbie VC++/CLI
- Index(es):
Relevant Pages
|