Add missing update to text_menu.cpp, and add constructor test.
This commit is contained in:
parent
42956372a7
commit
938e61f01a
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
9
test/constructor_test.cpp
Normal file
9
test/constructor_test.cpp
Normal 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
15
test/constructor_test.h
Normal 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
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user