Category : header-files

I have an assignment to implement a parallel version of the longest common subsequence algorithm (just calculating the LCS length). The program must use threads in order to complete the task as quickly as possible (at least, faster than a sequential implementation). Ideally, it should also utilize TLS in the threads. We had a similar ..

Read more

Its not recognizing the boost/tokenizer.hpp header file. Im using this textParse fucntion as an example. Its not recognizing the boost::tokenizer commands anywhere. #include<boost/tokenizer.hpp> std::vector<std::string> textParse(const std::string& bigString) { std::vector<std::string> vec; boost::tokenizer<> tok(bigString); for (boost::tokenizer<>::iterator beg = tok.begin(); beg != tok.end(); ++beg) { vec.push_back(*beg); } return vec; } } what am I doing wrong? Is there ..

Read more

I’m learning C now using vscode. I got curious and tried modifying the headerfiles. stdio.h to be specific and I found some really peculiar behavior. I studied the behavior using the simple Helloworld program. infos: Windows 10 OS, VScode v1.56.0, Compiled using CL not gcc, ucrt file path: C:Program Files (x86)Windows KitsInclude.0.19041.0ucrt The code: #include<stdio.h> ..

Read more

I was just wondering if anybody can help me with this and I am new to C++ and I am having a problem when I am separating the classes into different files. The error I am getting when I execute SepMain.cpp file is: /usr/bin/ld: /tmp/cciHobHn.o: in function `main’: SepMain.cpp:(.text+0x23): undefined reference to `Sep::Sep()’ collect2: error: ..

Read more

I have created a .cpp and .hpp file for a doubly linked list but when I try to call any functions in the main file i get the error message identifier "init" is undefined I don’t know what I am doing incorrectly, here is the first few lines of the .cpp file #include<iostream> #include <fstream> ..

Read more

I just started learning C++ and I have been doing some practice on using user-defined header files. I just made a simple code on doing math operations. Many videos online use #include "filename.h in their main program without even "connecting" the functions file with its header file. For instance, in my practice, I made two ..

Read more