473,326 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

MSVS2003 to MSVS2005 changes??

I have a program that I wrote in VC++ using MS Visual Studio 2003, however I've recently run into a problem where 2003 no longer wants to compile the code that it generates itself. That's not a big deal for me though because I have MSVS2005 and would rather use the newer version, but I leaned VC++ on 2003 and have run into a number of problems with changes in the syntax, and would like some help on the appropriate syntax and keywords that I should be using.

Most of these problems have to do with a class that I need to create for the program.

First of all, I noticed that the keyword __gc is no longer used. Based on the generated code for my form I defined my class as a public ref class. So far this hasn't caused a problem but if I should be using a different type of class declaration it'd be nice to know.

The second thing I noticed is that all of the things that used to be * (pointers) now seem to use ^ instead. (such as Strings variables and component variables). Out of curiousity, what are these? are they these handles that I've heard about that are supposed to be better to use instead of pointers?

So far my only real problems are 2 errors I've gotten. The first has to do with the __property keyword. What is the MSVS2005 equivalent for declaring get properties for my class.

The other error I've gotten is regarding the ToString() method for my class. I defined it like so:

Expand|Select|Wrap|Line Numbers
  1. String ^BaseStat::ToString()
  2. {
  3.     return name;
  4. }
Where BaseStat is the name of the class, and name is a String^ member of the class.

I get the following error message: "matches base ref class method 'System::Object::ToString', but is not marked 'virtual', 'new' or 'override'..."
I'm not sure about what this is all about.

Also, should I still be using the #using <mscorlib.dll> statement in the header file for my class?

Any help would be appreciated.
Sep 13 '07 #1
0 962

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tom | last post by:
Hi, I have a main program that uses a lot of definitions in different classes. They are included like this: from subclass1 import * from subclass2 import * My problem is: whenever I make...
42
by: Alan McIntyre | last post by:
Hi all, I have a list of items that has contiguous repetitions of values, but the number and location of the repetitions is not important, so I just need to strip them out. For example, if my...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
6
by: lanem | last post by:
I have a page that shows some data in a datagrid. All rows are updateable and then the changes are saved by hitting the "Save Changes" button. It is not a row by row save. All edits are made and...
16
by: Richard | last post by:
Hi, I am passing a structure to a subroutine where the passed parameter has been declared as ByVal. However, changes made to the passed variable inside the subroutine flow through to the...
30
by: Charles Law | last post by:
Here's one that should probably have the sub-heading "I'm sure I asked this once before, but ...". Two users are both looking at the same data, from a database. One user changes the data and...
5
by: vovan | last post by:
I have set of controls (Textboxes, checkboxes etc) along with the Grid on Windows Form. I use BindingSource to populate both Grid and the set of Controls. User selects the record in the grid and...
11
by: gyap88 | last post by:
Hello i m using vb 2005 express to do my project. I m suppose to create a datagrid to allow user to make changes to the database. The program display the database in a datagrid where users can juz...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.