Category : c++

My plan is to make a text file from the vector string. Let’s assume I want to give a bar alpha. Like in latex it would be bar{alpha}. I was able to manage to get the "u039B", but do you know how to get a vector string that is including the bar on the top ..

Read more

in my program I am attempting to input characters from a .txt file and assign them to a 2D Char array to form a Maze. The expected outcome of this code is: xxxxxxx xA…Bx xxxxxxx However I am instead warned that Column is greater than size (defined as 30) when I believe it should be ..

Read more

I have 2 classes: class b_class { public: int time_viewed; int parent_course; b_class()=default; b_class(int parent_course):time_viewed(0), parent_course(parent_course){ } }; and: class b_course { public: int course_id; int num_of_classes; b_class **classes; b_course(int course_id,int num_of_classes); }; In the latter I wrote the following code: b_course::b_course(int course_id,int num_of_classes) { this->course_id=course_id; this->num_of_classes=num_of_classes; classes=new b_class*[num_of_classes*sizeof(b_class*)]; for (int i=0;i<num_of_classes;i++) { classes[i]->time_viewed=0; //classes[i]->parent_course=course_id; ..

Read more

i have issues with inheritance. I have 7 files: main.cpp,Utils.h,Utils.cpp,Loader.h,Loader.cpp,Calculation.h and Calculation.cpp. Utils.h is inheriting from Loader.h and Calculation.h and Loader.h is inheriting from Calculation.h. 1: main.cpp #include <iostream> #include <stdio.h> #include <stdlib.h> #include "Utils.h" using namespace std; int main() { Utils Tool; Tool.Test(); return 0; } 2: Utils.h #ifndef UTILS_H_INCLUDED #define UTILS_H_INCLUDED #include <stdio.h> ..

Read more

For some reason this code is giving me the error: namespace "std" has no member "uintptr_t". Its in a .h file and I don’t understand why it don’t work as it works fine on my other header file. #pragma once namespace custom_keys { constexpr std::uintptr_t ogame_manager_key = 0; constexpr std::uintptr_t ofov_manager_key = 0; constexpr std::uintptr_t ..

Read more