Beginners - April 2019 (Page 23)

Copying class objects
 
Hello, I had a question re. copying of pre-defined types(int, doubles etc..) and user-defined types...
[9 replies] Last: it was just an example, I didnt even look at your variable names. if... (by jonnin)
Multi-File Program Linking
 
This question, I probably should have asked long ago, but I am thinking I am doing this linking of f...
[5 replies] Last: > and in main #include all my .cpp files > I guess that is what you we... (by salem c)
Explanation as to how this code works? Using a string for mathematical equation
 
Hello, I am trying to write a program in which I will be using a string to add or subtract a mathema...
[2 replies] Last: #include <iostream> #include <sstream> #include <string> using namesp... (by lastchance)
rand() and its operator %
 
can someone explain clearly how to use rand() and what it does, as well as its relationship to %. th...
[13 replies] Last: #include<iostream> #include <random> #include <chrono> #include <cstd... (by deleted account xyzzy)
by itsk
Elements in array not changing
 
For my class I need to change the smallest and largest element in an integer array to 0, and then ta...
[7 replies] Last: Oops, all I had to do was change the array element to be null and it w... (by itsk)
Capitalise the first letter of each new word.
 
Hi, im looking to find out how to capitalise the first letter of each word entered. any help would b...
[2 replies] Last: You should indent you code consistently. You've mixed the old and new... (by dhayden)
<random> and <chrono>
 
alright correct me if I am wrong in my evaluation of this code, im trying to understand how this wor...
[5 replies] Last: std::mt19937 generator(seed); puts that number into distribution(gen... (by Peter87)
How to limit integers per line (for loop)
 
The loop is to print all the even numbers from 100-200, with 10 per line. Currently it is printing i...
[1 reply] : Here's one way you could do it: #include <iostream> int main() { ... (by Cheddar99)
Undefined reference to `cv::cvtColor' even though library libopencv_imgproc is linked.
 
Hi, I know there is a lot of similar questions on the Internet, I just can't figure out this on m...
[4 replies] Last: @salem thank you for answering this. You've saved my life, I've wasted... (by Unspoken)
Cannot reading .csv
 
I have a program: #include <iostream> #include <fstream> #include <string> #define MAX_SC...
[5 replies] Last: Got that, thank you! Sorry for late reply! (by thinhphucvang)
Visual Studio Not Responding
 
I am using the latest version of Visual Studio Community and it has started some strange behavior. A...
[3 replies] Last: Do you have any anti-virus s/w running? Since .exe files you create ... (by salem c)
trying to use a function to complete this program but cannot get it to execute properly
 
please tell me if you see where my mistake is in this program cannot get to execute Complete the...
[3 replies] Last: Your loop contains TWO in >> value; One in the loop test, one in the... (by lastchance)
Is there any way to store tm values using Boost?
 
Basically I'm trying to store a value, map<string, Date*> m_dates, into a data file. This map uses a...
[1 reply] : This doesn’t answer your question, but can be a (awkward) workaround... (by Enoizat)
Is there a way to represent an integer character?
 
I am currently creating a find function to locate a specific piece of data in a different lines. Usi...
[10 replies] Last: I managed to get the loop to work but now I have a new problem, when I... (by nicholasjb1996)
Organizing program problem
 
Hi there i was wandering how can i divide my program into parts so i can write it easily when i w...
[2 replies] Last: There's "top-down" where you start with the highest level stuff and th... (by dhayden)
by ramp00
Testing for user input
 
At the moment if I enter a string first, and something that's not an int second it will just end up ...
[2 replies] Last: Oh okay, sorry.. Thanks a lot! (by ramp00)
Writing (almost) everything as library component!!!
 
I don't think that 'cpp core guidelines' recommends a single header. So yes, the first concept woul...
[9 replies] Last: Whether the posts were spam or not is rather a moot point now, they've... (by deleted account xyzzy)
Keywords vs identifiers with special meaning!!!
 
Using a keyword as an identifier is a very bad idea. It may work with some compilers and not others...
[6 replies] Last: Well, I only saw one of the spammer's posts and didn't immediately see... (by Ganado)
Program run without return
 
The program runs fine without any return i wanna know what's return statement do exactly?
[2 replies] Last: return sends a value back to the caller and exits the current function... (by jonnin)
Accessor inside a child class
 
Hi, Could anyone help me out with creating an accessor function that will allow me to work with a ...
[1 reply] : If it's just a simple accessor ("getter") you need, then something li... (by Ganado)
April 2019 Pages: 1... 21222324
  Archived months: [mar2019] [may2019]

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