Beginners - November 2018 (Page 10)

All of C++ topics
 
Hello. I recently started learning C++ starting at September(This year). Throughout the months leading up to today, I have a basic understanding of: -Operators...
[3 replies] Last: > can you please state all of the topics in C++, from beginner to adva... (by JLBorges)
by Blake7
Correct format for overloaded functions in classes
 
I'm not exactly sure what the correct format for writing an overloaded function for a class is supposed to look like. I was hoping someone could help me out rea...
[2 replies] Last: Thanks a lot. I can't believe I had semi-colons there lol. (by Blake7)
Can't write a map on file// Can't read neither.
 
Hi! It's my first question, so i thinks it's gonna be kinda messy. My english it's not the best, but i think somebody could understand me. Problem: I have ...
[5 replies] Last: thanks (by hahuyetapcao1)
simple switch statement not working correctly
 
New to programming in general. I get the idea but the outcome isn't correct. every time I enter a number, it keeps going to the default cout. #include <...
[2 replies] Last: As Homer Simpson would say. 'Doh' Duh thanks should have known. In mo... (by sgttenor)
by quete5
Program won't detect/use double
 
This program finds the area of a rectangle. Double getWidth isn't cooperating with me, keeps saying that it's incompatible with double getWidth() (line 42). Wha...
[2 replies] Last: Hi, There is a typo on line 6. You have defined getWidth identically... (by TheIdeasMan)
by quete5
Function definition errors?
 
This program calculates retail cost. I'm learning about function definitions, and my book says this is a way to do it, but once it's in my computer, VS says cal...
[1 reply] : Hi, remove line 1. remove the semicolon on line 8. normally lines 8 ... (by TheIdeasMan)
by darego
overloaded << for linked list objects
 
Hi there, I have a linked list with each node holding an employee object. The employee class has name and salary data. I am currently trying to create an overl...
[12 replies] Last: It works perfect now thanks a lot guys. I made the operator a friend o... (by darego)
by typinc
Recursive minesweeper
 
Hi, i need to code parts of a minesweeper game but these parts must be coded with recursive methodes. So what follows is to replace an element of a the vector m...
[1 reply] : You should first start with working code. There is a bug in the functi... (by tpb)
'fruitList' does not name a type
 
I am trying to create a list in a class, but when I add items to that list, it receives an error, stating "fruitList does not name a type". Please help! #in...
[2 replies] Last: Hello TheDomesticUser2, Your program uses "std::string"s, so you need... (by Handy Andy)
what does this block of code do?
 
Can someone explain me, line by line what does this code do? Thank you! code: using namespace std; void LOG(string input) { fstream LogFile; Log...
[2 replies] Last: Thank you very much! (by DudeYtakeMyUsrnm)
Printing first 20 prime numbers.
 
I know that there is a similar case posted here already but I just want to understand why my code doesn't work the way I wanted it to work. #include <iostrea...
[4 replies] Last: Oh sorry my bad. Thank you very much for the help! (by hexyzroyce)
Even and odds
 
Im trying to make a program that will print several stats, including the average of the even and odds of 10 numbers. I have finished them all and they seemed to...
[13 replies] Last: It works great thx so much you guys (by Warzombie3701)
do while loop with header file help
 
I need to code a menu options from changing inches to centimeters or centimeters to inches with a header file and I am lost. #include <iostream> #include "H...
[2 replies] Last: Hello ernistine2, As hoogo said: PLEASE ALWAYS USE CODE TAGS (the <... (by Handy Andy)
Polymorphism
 
What is Polymorphism ? Give me a simple example of it.
[7 replies] Last: http://www.cplusplus.com/doc/tutorial/polymorphism/ (by closed account E0p9LyTq)
Competitive programming problem
 
So I got a task to write a program, but my program doesn't pass all of the tests and I don't know what is the problem. I have the ability to test if my program ...
[8 replies] Last: Hello Donatas123, You wrote: As for checking if file opened corr... (by Handy Andy)
Guess the missing number magic square game
 
I have a magic square which now needs to have one number missing and the user must input the missing number and the missing number needs to be random. So every...
[1 reply] : One way would be to store the row and col of the missing number. When ... (by Thomas1965)
by MrMode
Open gl
 
Good day , i am trying new tutorials on learnopengl.org, and there is part where i need to use cmake. https://learnopengl.com/Getting-started/Creating-a-window ...
[2 replies] Last: You can download and run my simple project example: Triangle_GlfwOpenG... (by Observer)
For loop repeating troubleshooting
 
Hey guys, I'm currently learning loops in my C++ class at school. I seem to be pretty stumped on the concept of the for loop, and was wondering if anybody could...
[4 replies] Last: Uh thanks. (by extremeclay)
Vectors capacity
 
How does capacity in the vector class work? I don't understand why it increases if you add enough new items in the array. For example: #include <iostream> #inc...
[1 reply] : When you create a vector, an amount of memory is allocated for it to u... (by Repeater)
by AL88
Please help me fix my deep copy example
 
I'm trying to memorize and type out a deep copy class, what is wrong with line 9 "error request for member obj in ((dcopy)*this)->dcopy::x which is of non class...
[2 replies] Last: thanks, silly typo :-) (by AL88)
November 2018 Pages: 1... 89101112... 24
  Archived months: [oct2018] [dec2018]

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