Help with a build error in Visual Studio

AI Thread Summary
The discussion revolves around a build error in a simple C++ program involving class definitions in Visual Studio. The primary issue identified is a missing semicolon after the class definition in the Inventory.h file, which leads the compiler to misinterpret the subsequent code. Participants emphasize the importance of understanding how header files are merged into source files during compilation, which can obscure error messages. The conversation also touches on the challenges of managing multiple files in Visual Studio and the need for better error messaging from the compiler. Overall, the thread highlights common pitfalls in C++ programming and the learning curve associated with using integrated development environments effectively.
  • #51
Mark44 said:
"Collapsing" and "expanding" the folders is what you call this. These have nothing to do with whether the program runs or not. They are just views of the hierarchy that VS shows you. The program files are still there (unless you deleted them).

Funny it doesn't do that anymore.

What is the purpose of opening and closing the folders?

Thanks
 
Technology news on Phys.org
  • #52
yungman said:
What is the purpose of opening and closing the folders?
(Sigh...)
What's the purpose of opening and closing a door?
 
  • Like
Likes Vanadium 50
  • #53
Mark44 said:
(Sigh...)
What's the purpose of opening and closing a door?
But if you close the door, you cannot access inside. You can access the folder whether it's open or not, that's the difference. If you close the folder, you cannot run the program, then it makes the whole world of sense. That's just common sense. Right?
 
  • #54
yungman said:
If you close the folder, you cannot run the program, then it makes the whole world of sense.
If you open the folder or the door, you can see inside. Having a folder open or closed in Solution Explorer makes exactly zero difference as to whether you can run the program.
yungman said:
That's just common sense. Right?
Nope.
 
  • #55
Mark44 said:
If you open the folder or the door, you can see inside. Having a folder open or closed in Solution Explorer makes exactly zero difference as to whether you can run the program.
Nope.
I guess we have a different definition of common sense. If the door is close, I cannot see inside, BUT I can just walk in and take anything I want and change anything I want? ....Anyway, this is off the subject, now I know. Maybe that's part of why I find it so difficult to read in CS stuff on line.

I actually took the time last night to read the VS site, it is very hard to read, same as going online and search.
 
  • #56
yungman said:
If the door is close, I cannot see inside, BUT I can just walk in and take anything I want and change anything I want?

No, but you can still press a button outside the room that makes a machine inside run.
 
  • #57
yungman said:
guess we have a different definition of common sense.
Apparently.
yungman said:
If the door is close, I cannot see inside, BUT I can just walk in and take anything I want and change anything I want?
If the door is closed, you can't see inside. If the door is open, you can see inside. It's the same idea with the open (expanded) or closed (collapsed) folders in Solution Explored. Again, whether the folders are collapsed or expanded, it makes no difference as far as whether the program will run. If your program won't run, it's because of something else entirely.
yungman said:
I actually took the time last night to read the VS site, it is very hard to read, same as going online and search.
This page in the docs -- https://docs.microsoft.com/en-us/visualstudio/get-started/visual-studio-ide?view=vs-2019 -- would be a good place to start. Other topics in this section are:
  • About the code editor
  • About projects and solutions (which would have answered a lot of the questions you've had)
  • More Visual Studio features
There are also tutorials that focus on the different languages that VS supports. If you want to learn how to use Visual Studio, going to the source is better than some random online search. That's common sense ...
 
  • Like
Likes yungman
  • #58
@yungman, please start a new thread with this question. Your post has nothing to do with build errors in VS.
 
  • Like
Likes Vanadium 50
Back
Top