General C++ Programming - January 2020 (Page 3)

by mbozzi
What is the etymology of the keyword "virtual"?
 
In D&E, Stroustrup mentions the name "virtual" is borrowed from Simula, but doesn't go into more det...
[5 replies] Last: The lens may make the person appear upside down and very close, but i... (by againtry)
studying variadic fails
 
amid studying variadic, I fail to understand why this can't work template <class T> struct Accumu...
[3 replies] Last: There's a huge risk to me of this being called "fatuous", but hey-ho,... (by againtry)
C++ at the end of 2019
 
Let’s reflect on how C++ changed during 2019! What were some significant events, how the Standard ...
[no replies]
Last digit of factorial (TLE)
 
I just made a program to calculate the last digit of the factorial of an int: #include <iostream...
[10 replies] Last: I guess that it's happening near powers of 10. Then the factorial is e... (by lastchance)
Ascending numbers
 
I want to make a program which should read a number n, which describes, how much numbers are goig to...
[1 reply] : #include <iostream> int main() { int n; std::cin >> n; ... (by dutch)
by Norej
error check is not working properly
 
okay so i have an input file and it is filled with data like so 2 200708211245 F70.5 20070721...
[1 reply] : ignore the function prototypes at beginning (by Norej)
c string not printing
 
hello, I was wondering why my c string from my array was not printing? code: #include <iostream>...
[3 replies] Last: tttt (by closed account 1bfSwA7f)
need help creating hollow triangle using for loops
 
for a school project i have to try to make a hollow triangle whose size is based on the user's input...
[4 replies] Last: Using your editor and a fixed-width font, create a file containing a c... (by dhayden)
Understand of "quasi" external sort
 
How can I sort these 120 integers with only 20 integers at a time by using a "quasi" external sort? ...
[9 replies] Last: Ok, that's helpful. Thanks for the information. (by mlanuri10)
Call of overloaded constructor is ambiguous
 
When I try to instantiate objects of class Foo in main() of foo.cpp, I keep getting errors about how...
[12 replies] Last: @Enoizat- I didn't think about "const". That qualifier would definitel... (by vaderboi)
Copying closure of lamda expression
 
Hello, If you think this is a beginners question feel free to beat me for not using the correct for...
[11 replies] Last: OK. Thank you who responded. I was thinking, a lambda is a function ... (by NorbertMueller)
3 number Random generator
 
Hello!! I’m currently struggling on my program with changing the function of getNumbers() . What ...
[9 replies] Last: #include <iostream> #include <random> #include <ctime> using namespac... (by lastchance)
Finding a lexicographically minimum permutation
 
I want to make a program that finds me the lexicographically minimum (basically where all of the num...
[16 replies] Last: Yeah, I had a sh!t-load of memory problems which I've solved but not p... (by againtry)
by Norej
create a human readable output file with char arrays
 
The program must be able to work for an input file that contains following information: # of temp...
[4 replies] Last: It's now up to you to convert what's in the buffer each time to format... (by againtry)
Solved Sudoku Puzzle (Need help)
 
Hey guys I need some help identifying the error in my program, as I'm using nested loops to print ou...
[3 replies] Last: Line 13. What makes arr so special that it doesn't need to be checke... (by dhayden)
Broker Chain
 
Hi, I'm reading Design Patterns in Modern C++ by Dmitri Nesteruk (I'm not sure I can recommend it...
[1 reply] : I might have seen something of this nature with a message filter; the ... (by Repeater)
Using execution file vs debug
 
The git hub for my project is: https://github.com/Doraonroids/Pucker I'm using visual studio 2019...
[2 replies] Last: ^^ The above is a common issue as VS sets up paths for you when you r... (by jonnin)
It is not detecting any syntax errors but it just ends instantly.
 
//******************************************** //File:wk1_change.cpp // //Summary: a program that...
[5 replies] Last: Type: System("pause") or cin.get() This worked for me, so I hop... (by b p t)
by Norej
project dealing with char arrays
 
YYYYMMDDHHMM (e.g. 200708201425) This should be converted to: 08/20/2007 1425 i need to con...
[8 replies] Last: For a one-off timestamp I wouldn't need base, and I could initialise b... (by lastchance)
by bibo
Segmentation fault:11
 
vector<int> solve(vector<int> arr, vector<int> queries) { vector<int> res; int n = arr.size...
[5 replies] Last: Thanks it worked :) Thanks for using code tags. :) And note that dh... (by dutch)
January 2020 Pages: 12345... 9
  Archived months: [dec2019] [feb2020]

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