Beginners - August 2019 (Page 6)

Errors when explicitly deleting move assignment operators
 
Today I came across this code: #include <string> #include <vector> #include <iostream> st...
[5 replies] Last: @TheToaster, despite the name "std::move", the function doesn't perfor... (by Niccolo)
Binary shift is "too big" but isn’t
 
I’m making a floating_point class and am trying to access the last bit in an unsigned long by ma...
[7 replies] Last: Note that numeric_limits<>::digits is the number of non-sign bits in a... (by dhayden)
Question about r-value reference with function call
 
I saw the sample code on Stack Overflow. (https://stackoverflow.com/questions/3582001/advantages-of...
[2 replies] Last: > every functions' return value is treated as r-value. Is it correct? ... (by JLBorges)
by Ch1156
Pointers vs references for class objects (1,2,3,4)
 
So in a class using virtual, I see some examples use pointers like so: Weapon *w = new Weapon...
[62 replies] Last: I was just wondering if that was the best way to do it, it seems like ... (by Ch1156)
help with search
 
Hi everybody, I want to print out the qualified items in a vector if a user decides to search for it...
[2 replies] Last: #include <vector> #include <algorithm> #include <iostream> using name... (by anup30)
string and file
 
Hi! I'm trying to read lines from a text file. The file is like: name1 surname1 number number_1 num...
[6 replies] Last: LearnCpp's tutorial page on std::stringstream : https://www.learncpp... (by deleted account xyzzy)
by RicoJ
Making my own iterator: how to convert a non-const iterator to a const-iterator?
 
Hi all, I am trying to implement a custom container and I need to make an iterator for it. I want...
[1 reply] : > I want to squish const iterator and non-const iterator in one class... (by JLBorges)
Shuffle Algorithm for my Poker application
 
I am in doing a school-related project which requires that I incorporate various elements of what we...
[12 replies] Last: It sucks being a noob at c++. Some of us still are. Self-taught and... (by deleted account xyzzy)
vector of unique_ptr
 
I tried to make a vector of unique_ptrs, but here I get a compiler error when I try to dereference t...
[3 replies] Last: Also a quick tip. When making a unique_ptr, you can also use the std::... (by KishoreG)
Tic Tac Toe AI
 
The program just crashes after a couple of go's and i can't figure out why # include <iostream> #...
[4 replies] Last: You have a lot of code that is nearly identical. That's always a good ... (by dhayden)
Debugging in Visual C++
 
I am having a hard time debugging in Visual C++. Most of the time, the element I want to watch is op...
[5 replies] Last: Debug code is often a hefty multiplier slower than release code so d... (by Repeater)
Rectangle Sum with array2D
 
I've been giving this code several tries but it keeps crashing. Input 2 integers n,m, and the next...
[5 replies] Last: Pardon me for piling on here, but I'm going to expand on @jonnin's and... (by Niccolo)
Program Is Outputting Data as an int not double?
 
I made a program that converts money from yen, kroner, and/or pounds to USD. However, for some reaso...
[5 replies] Last: Here are some examples of output: Input the balance of money you woul... (by PiggiesGoSqueal)
This has been asked before by others....
 
But it seems I can't apply the solutions given to them for some odd reason. My issue is the age o...
[19 replies] Last: "Problem Solved." Then please tick the box so the thread is green che... (by deleted account xyzzy)
Digit Extraction
 
Can someone help with my digit extraction our Teacher ask us to do like this, WRITE A PRGORAM THAT ...
[11 replies] Last: Thank you Sir, @lastchance, i finally submitted to my teacher. (by philipmorries3)
If/Then Statement Issues?
 
I picked up C++ as a beginning programming language after moving on from Scratch a couple of years a...
[6 replies] Last: Do not listen to spam poster, its random text. (by jonnin)
Why does this code not need a move-ctor?
 
My textbook is giving an example of a generic class to store generic objects for a game board withou...
[1 reply] : the move-constructor does what the author wants (move the vector) the ... (by ne555)
by Ryan15
Counting vowels and storing non-vowels into array
 
I would like to store any non-vowels in notvowel and display them but I'm not sure how to do it. ...
[2 replies] Last: Here is an implementation using a different function with C++17, just ... (by KishoreG)
First letter in string output not showing
 
Hi, i made a simple oop program in which i ask user to input some values and then print them. The pr...
[5 replies] Last: Thank you so much Andy, yes putting cin.ignore() after cin>>bookprice ... (by zeplika)
August 2019 Pages: 1... 45678
  Archived months: [jul2019] [sep2019]

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