Beginners - September 2020 (Page 7)

ambiguous call to overloaded function
 
Hello, I have created a function, but I am getting two errors, Ambiguous call to overloaded function and more than one instance of overloaded function matches t...
[7 replies] Last: Also to get you going in the right direction with namespaces I recomme... (by jlb)
by nakash
vector searching
 
so basically i have a load of words in my vector and i need to find words that contain "ly" how do i go about trying to do a find_if algorithm. also is it possi...
[3 replies] Last: copy_if(words.begin(), words.end(), back_inserter(ly), (const strin... (by nakash)
How to assign a value to a letter input
 
Hi, i'm very new to C++ and I am trying to write a program where a user chooses between two devices, one costing $90 and the other costing $95. The user inputs ...
[1 reply] : Have another variable, double cost; Then, const double cost_w = 9... (by Ganado)
Euro, Dollar, Pound Symbol
 
Good afternoon, You can tell me if it is possible to add the symbol of a currency like the euro, € dollar $ our Pound £. Best regards
[2 replies] Last: https://en.cppreference.com/w/cpp/io/manip/put_money (by againtry)
Calculate Discount c++
 
I have two price and discount variables. How do I calculate the discount of this product with the variables I have. #include <iostream> #include <local...
[6 replies] Last: You guys managed to solve my problem. Thank you all. (by croatoanbtw)
error: "cannot create std::vector larger than max_size()"
 
HI I have overloaded the >> operator as follows: std::istream& operator>> (std::istream& in, const Mything& thing) { // get data from th...
[9 replies] Last: In the original post, nothing is actually done with the Mything object... (by Ganado)
Asking for suggestion and help
 
Hello everyone I am a student I am learning from the internet in home I want to learn the server side programming in java as I am the beginner in java I don'...
[3 replies] Last: You might as well ask how to construct a quantum computer using stone ... (by George P)
Need some advice, storing numbers.
 
Hello everyone, so I have this coding assignment that I have to for class. The issue I'm having is the last part of the question where it asks for storing the 1...
[9 replies] Last: The assignment explicitly says that average should be an int, so you'l... (by dhayden)
The Next step
 
hello my 1ovely c++ partners (: im about to finish my second course in C++, these two Courses was about C++ fundamental, i reached the inheritance and polymorph...
[2 replies] Last: Thank you "Furry Guy" for your advice and information .. i feel that i... (by semsemdiver)
Reading file and put info in 2d vector
 
Hey I've been practicing how to go on and read from a specified file containing a matrix of numbers and trying to put that file info into a 2d vector and need s...
[7 replies] Last: Matrices are generally more than 2D arrays because they generally hav... (by againtry)
controlling the user
 
Hello the most lovely C++ society, a small question please. how to prevent the user from typing letter when reading number to integer var and vise versa preve...
[10 replies] Last: "seeplus" thank you my friend :) (by semsemdiver)
Ambiguity in pointers
 
Hello, Could you please explain this? Dereference operator is used to access or manipulate data contained in memory location pointed to by a pointer. but ...
[10 replies] Last: C is more of the 'well if you really want to, I guess you know what yo... (by seeplus)
Access Violation - Pointers in C
 
Hello, The second printf doesn't work. could you please explain? Thanks # include <stdio.h> int main() { int n = { {2,4,3 }, {6,8,...
[4 replies] Last: https://comp.lang.cpp.moderated.narkive.com/EtKG7hO6/cannot-convert-in... (by Enoizat)
Small game problem, last bool variable seems to output both true and false
 
So I wrote a super simple text based game with C++, and everything works until the end. My final if else statement is supposed to say either YOU WIN!!!, or you ...
[5 replies] Last: Oh, that explains why its was still giving me the error, the same thin... (by levilone)
Calculator setup issue
 
I set up a simple calculator but i'm getting a error saying end1 was not declared in this scope? #includ <iostream> using namespace std; int main() ...
[3 replies] Last: endl is a mnemonic for " end line and flush". (by mbozzi)
Change calculator
 
How to write a change calculator for a coffee shop menu? ). The cashier will enter the size of the beverage ordered (example: ‘S’ – small, ‘M’ – med...
[2 replies] Last: Hello vaturogo, As jonnin started out and the way I see it: How t... (by Handy Andy)
seconds in to hours minutes and seconds
 
Write your question here.
[3 replies] Last: h=t/3600 m=t%3600/60 s=t%60 (by lastchance)
Setting a base class property in a derived constructor
 
I am working through some practice problems for an intro C++ course. In one, we must create a derived class MoneyGift, which derives from a base class Money. M...
[2 replies] Last: What you have provided is the absolute best way to do it. If name is ... (by doug4)
by Mif
Replace a specific line in a file with a new text
 
The code actually works, but not as expected, it replace a line but not the line I choose, For example if I choose to replace line 2 he replace the line 3 or i...
[12 replies] Last: You're welcome. We were all beginners at some point. When code doesn't... (by seeplus)
Loop Breaking
 
Cant figure out why the loop keeps getting broken when I enter y at the end and doesnt loop! #include <iostream> #include <ctime> using namespace std; ...
[1 reply] : toupper() makes a lower case letter upper case. But you are comparing ... (by seeplus)
September 2020 Pages: 1... 5678910
  Archived months: [aug2020] [oct2020]

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