• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Good forum sites for VC++ questions?

Felecha

Golden Member
I'm a student. Often I want to get help, the kind that forums are just made for. I've found AnandTech the best hardware forum -- tons of people on all the time, good dependable advice. Anyone know of a recommendable site for questions about Visual C++ programming? I've found a few by searching, but they are pretty slow -- not a lot of people seem to be there, questions dangling for days, seemingly more questioners than answerers.

Here is my question of the day (just in case any of you have it handy right here for me?)

I'm a student. Just getting to the chapter in the text(Ivor Horton, Beginning Visual C++ 6) where he's teaching us to use the IDE's Wizard, and all those Class View right click tricks to build the program, rather than typing things raw in the editor. Cool stuff! But I'm puzzled -- the example he's using to walk us through includes adding several overloaded operator functions for the class, and if they're added with the Wizard, they don't do what other functions do -- a definition appears in the .cpp, but no declaration appears in the .h file. And if I enter everything by hand, and try to use the tricks to go from the declaration to the definition or vice versa, it says "no definition found" and stuff like that. All the tricks work as promised for any other function I've been able to cook up, but it seems overloaded operator functions are in a subset that doesn't work the same??? I've scratched my head and wondered what's the little piece of the puzzle I'm missing???? Often my puzzles get solved when I find out where I left out just one little thing.

It's actually between terms, and I'm trying to get ahead for the next course, so I don't have the professor to bug on this one. Anyone got a clue for me?

Thanks a lot.
 
you can go to the forums at vbexplorer.com and ask them. i know i use to get vb info from them but not sure about vc++.
hope that helps.
de
 
I dunno if you're a member of Yahoo, but if you are (or are willing to sign up) there's a million C/C++ clubs, the one I'm in is great, I think it has like 3000 members and I can get help usually within 24hrs. I'd love to help you with your prob, but I'm a student myself (actually I'm teaching myself through books, which I think you are too🙂). So try those, I'll send you an invitation that club if you'd like. Good luck!
 
Okay, seems to me you have two questions, so I'll take 'em one at a time.

Re where to go to for help, I've found two absolutely wonderful sources for aid in my endeavors, both personal and professional. The first is the discussion lists hosted by Microsoft. For instance, I do a lot of work with ATL, and I can get pretty much any question answered by people ranging from experienced to inexperienced to the published authors of different books... I just answered one of those author's questions the other day! 🙂 Try going to... I think it's discuss.microsoft.com and look around there... otherwise search for discuss/discussions/etc from the Microsoft search engine -- see what lists you might be interested in!

The other source is where these forums stem from: newsgroups. Go to things like comp.language.c++... I don't remember the other ones, but I'm sure you can find them. Try using www.deja.com

As to your second question... I don't know exactly what procedure you're following, or what version of VC++ you're using, however, as long as I can remember programming with Microsoft's compilers, I've never run into that problem. Check if you have the most recent Service Pack. As I'm not completely clear on what you're doing to get the "definition not found" type of errors, there's one other thing I can think of -- try doing both of the following: saving and exiting, then going back in. The other would be to compile the program... sometimes VC++ just needs to be told there are changes. The one other trick is to delete... the .PCH file, if I remember correctly -- it should hold the browse info for your source code.

Good luck!
Andrew

PS: Speaking as someone self taught -- you learn a lot by just "listening in" to other people's discussions -- and don't be afraid to ask! 🙂
 
Nevyn522 --

I'm using VC++ 6.0, just bought it a month ago.

I'll show you what I see. I took the author's example program and whittled it down a bit for simplicity. It's based on a class for good old boxes:

class CBox // Class definition at global scope
{
public:

double m_Length; // Length of a box in inches
double m_Breadth; // Breadth of a box in inches
double m_Height; // Height of a box in inches
};

The real example program was a good deal more complicated, and we wanted functionality for, say -- how many candy boxes could fit inside a bigger box, like a shipping carton? This called for an overloaded operator function for division -- essentially, dividing one box object by another. By then we had already developed the body of the function, how you could use the dimensions of each box in its data members to sensibly figure out how many candy boxes could go in a carton. All the other stuff that was going to go in the class was ready to go, too. We had reached the point in the text where he started showing us how to do things in the VC++ IDE with its Wizard and right-click tricks, and how you could go from definition to declaration and all that cool stuff.

He walked us through how to add member variables and functions using the Wizard. In the dialog box, I entered "int" for type, and "operator/(const CBox& aBox) const" for Function Declaration. Hit OK, and I get the function definition outside the class definition, but no declaration inside. I tried making up my own trivial function "int add(int a, int b)", and entered it with the Wizard, and everything worked. Declaration was there, definition was there, I could switch from one to the other with the Wizard button.

class CBox
{
public:
int add(int a, int b);
double m_Length;
double m_Breadth;
double m_Height;
};
int CBox:😱perator /(const CBox &aBox) const
{

}

int CBox::add(int a, int b)
{

}

int CBox:😱perator /(const CBox &aBox) const
{

}

For some reason, it does "work" if I enter "CBox operator+(const CBox& aBox) const" -- that is, the declaration appears as well as the definition, but ... the Wizard button tells me "Cannot find the declaration of this function when I click on the definition and hit the button.

I wondered if leaving a space after "operator" was needed -- you know those little, little things. But no. Or maybe I had something wrong in the const stuff. But I can't find a clue. I copy it again and again exactly as in the text, and this is what comes out. Any help?

I'll look at the other groups, too. Thanks
 
Back
Top