When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
21 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
Thank you @hasty aurora
So what exactly is the issue you're running into?
I am really just trying to understand how to implement the code I made so far into my base.cpp so I can display the videogame titles from that games.txt file in the repo
Basically, I want to append from the file that has the game title at the beggining of each line and put it on the home page
Its difficult to do I understand but my professor specifically asked for a linked list even though a vector would have been easier smh
Basically what I would do would be:
Create grid in WxWidget window
Read file line by line, putting games into a vector
For each game in the vector, add a WxWidget panel for the game to the grid
Of course it's school
So okay, you've gotta use linked list
Is loading into the linked list the problem?
I'm just trying to narrow down a specific problem that can be tackled
So basically To append game titles to the homepage of my WXwidgets application, I need to modify the VGLFrame class which is defined in base.cpp and instantiated in base.h
I am thinking to add a member variable of type linked_list to store the list of games.
Than In the constructor of VGLFrame create an instance of catalogManager and use it to populate the linked list with games.
//catalogManager cm;
//games = cm.getGames();
Create a wxBoxSizer for the game titles, and then create a wxStaticText widget for each game title, and add it to the sizer.
//wxBoxSizer* gameSizer = new //wxBoxSizer(wxVERTICAL);
//for (unsigned i = 0; i < games.listSize(); i++) {
// wxStaticText* gameTitle = new wxStaticText(this, //wxID_ANY, games[i].getName());
//gameSizer->Add(gameTitle, 0, wxALL | //wxALIGN_CENTER_HORIZONTAL, 5);
//}
//mainSizer->Add(gameSizer, 0, wxALL | //wxALIGN_CENTER_HORIZONTAL, 5);
Add the gameSizer to the mainSizer of the frame.
//mainSizer->Add(gameSizer, 0, wxALL | //wxALIGN_CENTER_HORIZONTAL, 5);
Call the Layout method of the frame to update the layout.
```cpp
int main() {}
```
int main() {} ```
You would need to store the linked list if you have to query it later, yes
@remote kelp Has your question been resolved? If so, run !solved :)
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity
No problem! Good luck!