Add missing update to text_menu.cpp, and add constructor test.

This commit is contained in:
kelson8 2025-01-06 13:26:56 -05:00
parent 42956372a7
commit 938e61f01a
3 changed files with 30 additions and 2 deletions

View File

@ -31,9 +31,13 @@ void TextMenu::TextMainMenu() {
if(show_text)
{
TextFileFunctions::printTextOutput("test.txt");
//ImGui::Text(TextFileFunctions::printTextOutput("test.txt"));
// This just spams the console.
//TextFileFunctions::printTextOutput("test.txt");
// This works!!!
// Why? I didn't think this would print multiple lines.
//outputTextFileContents("test.txt");
TextFileFunctions::outputTextFileContents("test.txt");
}

View File

@ -0,0 +1,9 @@
#include "constructor_test.h"
// TODO Attempt to call in the main class or where ever the hell I'm doing this ImGui test.
Car::Car(std::string x, std::string y, int z) {
brand = x;
model = y;
year = z;
}

15
test/constructor_test.h Normal file
View File

@ -0,0 +1,15 @@
#pragma once
#include <iostream>
// https://www.w3schools.com/cpp/cpp_constructors.asp
class Car
{
public:
std::string brand;
std::string model;
int year;
Car(std::string x, std::string y, int z); // Constructor declaration
};