General C++ Programming - August 2020 (Page 2)

changing a classification code
 
Hello, I found this code on the internet (https://programmersought.com/article/52001300562/). I mana...
[15 replies] Last: Quote from stackoverflow.com : Results (Average of 100 runs; timed u... (by oneidacharisse)
Reading part of a file
 
Hi, I've been wondering if there's a way to show only some part of a file when it reaches a limit, i...
[3 replies] Last: check out binary mode struct order{ int day, month; int order; dou... (by ne555)
Passing anonymous object to thread does not return
 
I'm passing two separate anonymous class objects to two different threads. It's not clear why the fi...
[3 replies] Last: Thank you (by VMsrVT2Tyc)
Looking for MySet class examples
 
Hi there, Im trying to do kind of a project of sets that contains the following: 1) A parameter-fre...
[3 replies] Last: you should be able to find a class that does math sets in c++. be warn... (by jonnin)
Data Structures and Algorithms book recommendation
 
Hi, My semester is about to start and I wanted to start my course before the classes begin. I wante...
[12 replies] Last: the one for your class actually looks like it covers and explains a lo... (by jonnin)
by Noone1
CIN problem.
 
Hello, don't know why the while_loop doesn't execute with CIN statement. It printed the statement ...
[3 replies] Last: On Linux, if you've already begun to type something on a line before y... (by salem c)
access violation ifstream class?
 
I don't understand why i receive access violation, when my constructor shouldn't be deleting? [HE...
[8 replies] Last: the bool is the 'right' way to do it, IMHO. Now your code can be us... (by jonnin)
Build a wrapper class for array like objects
 
The wrapper class will have a constructor that will accept any array-like data structures like vecto...
[4 replies] Last: Wouldn't it be better to use a range based for loop? template <cl... (by dhayden)
Pointer to std::function<>
 
I have a problem where I want to copy a std::function<> object around. The implementation of the act...
[8 replies] Last: Thanks for this. some good info to know. I can't pass a reference to s... (by VMsrVT2Tyc)
std:thread fails compile if #include<algorithm> is used
 
Following fails compile, but works ok if I remove the <algorithm> include. Compiler Error Messag...
[2 replies] Last: some compilers must be forced into modern c++ with command line option... (by jonnin)
memory loss
 
I'm getting memory loss issues when checking with valgrind but I deleted the array so where is the m...
[12 replies] Last: using effective software engineering techniques to sidestep whatever ... (by zapshe)
template with smart pointer iterator
 
for (const auto& elem : coll) { What can auto be replaced with? I tried Coll::iterator but that d...
[17 replies] Last: Using auto isn't just less error prone, it's much more flexible. For e... (by dhayden)
Problem with debugging the C++ code with eclipse on Mac
 
I've stumbled upon the following problem when using eclipse (on Mac) to code in C++. I want to star...
[2 replies] Last: I went to an actual total eclipse a few years back, and then I finally... (by jonnin)
How to delete (backspace) unsubmitted input from the command line after calling cout?
 
I’m trying to create a program that waits either until the user inputs a certain keyword or until ...
[14 replies] Last: Thanks. All I could find was references for a readline() function. (by helios)
struct definition
 
I am used to defining a struct as follows: struct Point { int x; int y; }; ...
[2 replies] Last: #include <iostream> using namespace std; struct point { int x, y;... (by Manga)
by stav
container of container of incomplete type: UB or ok?
 
so usually you cant instantiate a std::pair with an incomplete type like so: class incomplete; std...
[6 replies] Last: just to rephrase i meant the incomplete type is only incomplete at th... (by MikeyBoy)
by dodo99
Refresh "modern c++" programming skill
 
I had programmed for C++ about 10 years but did not do any C++ programming (maybe once in while) aft...
[3 replies] Last: There is also an online tutorial you might want to take a peek at, Lea... (by deleted account xyzzy)
by abuh
Please help me
 
1) Design and implement a class Person. Each object of the class person contains the FirstName and L...
[8 replies] Last: It's not inappropriate but please realise we may never hear from @abuh... (by againtry)
recursive function and double linked list
 
Hello guys,I have doubts on how to do the function below can you help me? Consider a doubly linke...
[3 replies] Last: Hello you can find by using google advanced search with the dork as it... (by oneidacharisse)
getline function
 
So my class is taking a full name but for some reason when I use getline(std::cin,name) my program g...
[2 replies] Last: I'll start by congratulating you on writing your << and >> operato... (by dhayden)
August 2020 Pages: 123
  Archived months: [jul2020] [sep2020]

This is an archived page. To post a new message, go to the current page.