General C++ Programming - March 2018 (Page 3)

2D array issue
 
This is to calculate how much 3 monkeys eat in a week. it generates the total amount eaten by all t...
[9 replies] Last: Yeah, I didn't know there was a way to set the minimum to the highest ... (by daveconn66)
comparing strings
 
Write your question here. How can I compare these two strings and count when the strings are the sam...
[6 replies] Last: Thank you for your replies. I have figured out the source code, appare... (by codes4life)
Any O(log n) find time complexity datastructure that is not a map?
 
Any O(log n) find time complexity datastructure that is not a map.
[5 replies] Last: How often do you need to add or remove elements from the data structur... (by helios)
std::for_each
 
Hello, Is std::for_each faster than c++ for and in a for_each statement how can I determine the ...
[1 reply] : Did you look at: http://www.cplusplus.com/reference/algorithm/for_each... (by keskiverto)
Interesting bug with the pow() function
 
I tried running the pow function to generate large numbers and I get some weird results. At first I ...
[7 replies] Last: Or, don't use doubles ... the program is looking for integer powers, a... (by jonnin)
by ayokng
qualified name is not allowed @hash::NumberOfItemsIndex
 
Solved by putting everything in one class. Best solution I could think of hope it helps someone I...
[2 replies] Last: Yeah it was a typo Hmm the issue is with GUI version I'm making. it w... (by ayokng)
using template to pass aditional argument
 
I need to pass a (function with one argument) as an argument to another function, this another fun...
[6 replies] Last: 1. In arduino environment IDE appernetly there shoulnd not be a line b... (by mcf3lmnfs)
Bug in std::streambuf::in_avail ??
 
The following code: std::stringstream test; std::streamsize dataSize; test << ""; da...
[6 replies] Last: if a stream has data, but the data is not buffered in an object (gptr... (by Cubbi)
Compiling C++, Visual Studio vs. Code::Blocks output
 
I personally like the information VS 2017 Community outputs when compiling a simple C++ program: ...
[no replies]
by nsi
Create Big Multi-d Array w/o Causing Memory Issue
 
Dear C++ programmers! I have been trying to create a big multi-d array but each and every time th...
[6 replies] Last: There is nothing wrong with visual studio. I have used it on large pr... (by jonnin)
Velocity Program not working
 
I can't seem to get this program to work. Every time I compile it, it gives me "The velocity is 783...
[2 replies] Last: Thank you so much. :) (by Carrie Aeris)
Help reading the file
 
This is the text I have: Princeton University NJ Princeton 41820 8014 0.0740 0.98 0.97 Harvard Univ...
[3 replies] Last: After you read "temp", you still have the \n remaining in the buffer. ... (by doug4)
NIM Game
 
sorry I removed the code because the instructor of the class I am in wanted me too.
[4 replies] Last: OMG!!!!!!!!! it was one semicolon!!!!!!!!! Thank you very much! I r... (by daveconn66)
Mandlebrot set zoomer...
 
Text mode nostalgia. What should I do with it next? #define LOOPS 1000 #define ESC 27 #d...
[no replies]
Comparing lists of strings
 
I need to count the number of strings that occur in the first list, but not the second list. Thi...
[6 replies] Last: From file. Disallowing (or assuming no) repeats. #include <iostream> ... (by lastchance)
by noel3
Crazy IDE Pointer programs problem
 
When I create a program with pointers...then close and create a second program...then compile and ru...
[5 replies] Last: A good and free Windows IDE is Visual Studio 2017 Community. A good c... (by closed account E0p9LyTq)
boost date-time conversion error
 
date dt{2018, 5, 14}; string str = to_simple_string(dt); cout << str << endl; error : undefin...
[1 reply] : "Undefined reference" means that when the linker went looking for the ... (by Repeater)
How can I take an input from a 2D array into a vector
 
Hi, I have an an array of integers lets say: 1 2 3 4 5 6 I want to take the input from this...
[3 replies] Last: Exactly the same way you have the 1D row vector. Three numbers is thre... (by keskiverto)
How can I find if a type is an instantiation of a certain template, like say set?
 
Hi, Now that we have constexpr if, can we find if a type is the specialization of a certain templ...
[2 replies] Last: Thanks!! Juan (by JUAN DENT)
Can anyone explain this BUG and how to fix it?!
 
So,if you were to run the program, after entering the file name again after the file had been create...
[5 replies] Last: Sorry, yeah that was comment... just ignore that haha (by ggrules)
March 2018 Pages: 12345... 15
  Archived months: [feb2018] [apr2018]

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