Hello I am new to C++ and used to java. I have created a GUI which I need to call and execute a class file. I have been helped by someone but unfortunately the code shows error and I dnt know whats happening since I am clueless in C++
There is a big gap in your understanding. I'm trying to think of a good way to point you in the right direction but...
Basically the first post has some C++/CLI code that looks like it is from a Windows forms application (.net) and it looks like the code is trying to show another form. The code in the header file is C++, although C++ and C++/CLI can be mixed it is not advisable while you are trying to find your way (and this is not the way to do it).
Do you wish to learn C++ or programming for the .net platform?
Basically the first post has some C++/CLI code that looks like it is from a Windows forms application (.net) and it looks like the code is trying to show another form
Thanks Grey Wolf for the reply, I would like to learn programming for the .net platform, I have gone through the tutorials in the Visual Studio express c++2010.
The code in the header file is C++, although C++ and C++/CLI can be mixed it is not advisable while you are trying to find your way (and this is not the way to do it).
You are right, I am trying to call a class file when I click the button, thats all. So what way is the best way, I have done this in java and its soo easy and fast, I am just getting frustrated with this.
I would like to learn programming for the .net platform...
<My opinion> C++/CLI is possibly the most complicated and least well documented of the .net languages. My recommendation, if your overriding goal is to program on the .net platform, is to start learning C#.
Although this will not answer your question directly it may be worth giving the following a quick read.
http://msdn.microsoft.com/en-us/magazine/cc163852.aspx
If you do want to learn C++/CLI, post back and we'll see what we can do to help.
yup I would like to learn c++, but its just that time is running out for me, is there any place that I could be referred where it deals with what I need directly.
Hmm, is what you quoted really what is in your IOFile.h file?
In that case :
- There is no definition of IOfile in IOFile.h, so i find it logical that the compiler doesn't know what it is
- Why do you have a main() in a header file?
The main problem with your original code is that you did not define a class in the IOFile.h and you therefore you could not insatiate one in the click handler.
I would recommend getting hold of a good book on C++/CLI, something like Pro Visual C++/CLI and the .Net 3.5 Platform
by Stephen R. G. Fraser
Thanks alot, the book looks good, I had a look at it and will do. btw when I try and run your coe it shows the same error as the 1st post. Any suggestions why?