Beginners - December 2019 (Page 5)

by asxxx
Sort matrix
 
Good morning, I trying to sort matrix but using for loops but I can't find errors. Thanks for tips. #include <iostream> #include <cstdlib> #include <ctime>...
[5 replies] Last: Thank you very much for help. (by asxxx)
The code outputs the value wrongly
 
I am trying to write a code that will print the number values and tat the number of the smallest number of coins that I can exchange my money with. However, If ...
[9 replies] Last: Hello marialavr, One thing I forgot to mention. Be careful using the... (by Handy Andy)
Error: Expression does not have class type
 
In the row 67 there is an error: 'p.MESWERT::getEinheit' does not have class type. What am I doing wrong? #include <cassert> #include <iostream> #inclu...
[8 replies] Last: It might compile, but it still doesn't make sense. Are you just copyin... (by Ganado)
Need help :(
 
Hi, I just started learning c++ not so long ago. I asked a friend to give me some c++ exercises so i can try and do them, i did most of them but i got stuck on ...
[3 replies] Last: Thank you guys very much for the help. (by DarioHak)
reading random line in txt file
 
I want to create a function that it takes random line in txt file and declare it to Student object. How can i do that class Student { private: strin...
[3 replies] Last: A single pass through the file is sufficient. #include <iostream> #i... (by JLBorges)
How to use classes and virtual functions to make a player/enemy Class
 
Hello I am very new to programming and I am currently trying to torture myself to get better at coding and C++ classes for my project. My plan for this class is...
[2 replies] Last: For the sake of accuracy: In Object Oriented Programming, a Class is... (by MikeyBoy)
c++ student automation
 
hi add students add classroom changing a student's class delete student delete class i am doing a student automation with these features but i'm stuck...
[2 replies] Last: #include <iostream> #include <fstream> #include <string> using ... (by againtry)
by sedi
use of deleted function
 
Hi, I have defined two constructors, one default and one with init parameters: Complex(); Complex(double &x, double &iy) { m_x = x; m_iy = iy;} ...
[2 replies] Last: The ambiguity exists because you've added a copy constructor accepting... (by mbozzi)
Console returning wrong char (tic tac toe)
 
Good evening. I decided to learn coding for the first time a week ago, but I'm already having some issues. I'm trying to make a basic Tic Tac Toe game where the...
[2 replies] Last: It seems, that you have mistakenly confound the assignment operator ( ... (by nuderobmonkey)
Errors in the code
 
Hi! There are some errors in my code that I don't know how to solve. The rows 73, 74, 99 and 103 give me a "cannot convert 'MessWert' to 'double' in initialisa...
[3 replies] Last: Apparently, shortly after C++14 was finalized, this error was addres... (by Ganado)
Avoiding an extensive if statement parenthesis
 
suppose in your header you had these integers int a = 0; int b = 0; int c = 0; int d = 0; int e = 0; int f = 0; int g = 0; int h = 0; ...
[14 replies] Last: So rather than a,b,c, what you really meant was s1,s2,s3,s4,... At wh... (by salem c)
Why I get a wrong file size with tellg?
 
Why do I get a file size of 2? As input file, I take my source file. /* streamtest.cpp */ #include <fstream> #include <iostream> int main() { std::str...
[3 replies] Last: Thank you dutch! (by nuderobmonkey)
by Tck03
Adding a high score to a game
 
I am working on a dice rolling game, is there any way I can implant a high score into this code? #include <iostream> #include <stdio.h> #include <std...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ Put the high score in a ... (by Repeater)
by flav32
number of vowels between consonants
 
I have to get the number of vowels that sit between consonants in a text. The thing is that if I have those words for example : "more power", the "e" in more sh...
[2 replies] Last: Thanks!! (by flav32)
Can't get Hello World to print in Visual Studios 2019
 
Hello all, I recently downloaded visual studios 2019 and am running into an issue that I could not find a solution for after hours of research. I am trying to ...
[6 replies] Last: there is a way to set the IDE to have this show up at the end of a ru... (by George P)
Two problem with String in C
 
Hello, First of all, I want to ignore the Enter and get the name from the input. Second why the below syntax doesn't work? I have to use strcopy. ch_arr_re...
[3 replies] Last: When you want to use C string library functions #include <string.h> ... (by George P)
DVD Collection program
 
This program is supposed to utilize two classes. One class is to hold the information for a DVD. The other class is supposed to maintain the dvd collection, suc...
[3 replies] Last: #include <iostream> #include <string> #include <vector> #include <iom... (by JLBorges)
Problems Within My Code
 
I am trying to create a simple tic-tac-toe game for an assignment. I believe there is a problem with my get_move function. After the user picks the row and colu...
[3 replies] Last: I am not very familiar with how most people indent their code. The e... (by George P)
ABC
 
Hello V
[no replies]
Whats Wrong In This Code......HELP
 
Write a C++ program to create a class District. having district_code, district_name, area_sqft, population, literacy_rate. For displaying details use appropriat...
[1 reply] : Line 16 will only read one word. So if you enter a name like "Tinton F... (by dhayden)
December 2019 Pages: 1... 34567... 13
  Archived months: [nov2019] [jan2020]

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