Category : segmentation-fault

I have got a abstract base class Type which has multiple concrete child classes like Type_bool, Type_int, Type_double etc. Furthermore I construct two vectors of type std::vector<Type*> holding objects of the concrete child classes. I have implemented the following method to check whether these vectors are the same. In this context same means that they ..

Read more

i am currently learning C++ and encountered a strange problem/error. a sample of the code is this: int main() { int paramToRemove = 0; std::list<char*> argV = {"Hello", "World"}; std::list<char*>::iterator arg; while (argV.size() != 1) { arg = argV.begin(); if (arg == argV.end()) { break; } paramToRemove++; if ((*arg)[0] == ‘-‘ && (*arg)[1] == ‘-‘) ..

Read more

I’m trying to build a small game of tictactoe on the console, for that I use an 2d array of strings (I think that’s what it’s called). void convert(int map[TTT][TTT],char* mapvis[TTT][TTT],int s){/* *has the value, *the illustration, *directs a reset on s=1*/ if(s==1){ char* mapvisual[3][3]={ {"__","|__","|__n"} ,//resets map {"__","|__","|__n"} , {" ","| ","| n"} }; ..

Read more

#include <curl/curl.h> #include <cstdlib> #include <iostream> int rad = rand() % 100000; std::string agent_name = "https://127.0.0.1:443/agent/" + rad; std::string full_agent_name = agent_name + std::to_string(rad); int main(int argc, char **) { CURLcode ret; CURL *curl; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 102400L); curl_easy_setopt(curl, CURLOPT_URL, full_agent_name.c_str()); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); ..

Read more