Beginners - February 2021 (Page 7)

classes and friend-functions
 
Create a House class. A variable of type House must contain the following fields: street; number; number of apartments, floors, entrances, number of apartments ...
[3 replies] Last: No problem :) (by Ch1156)
by eb1993
Binary Insertion Sort
 
I'm feeling very stuck with what to do, very new at this. I'm supposed to write an insertion sort and modify it such that instead of using a backwards linear se...
[1 reply] : where is the insertion sort? if you have not done that, did you have a... (by jonnin)
No declaration matches
 
I am trying to find the area and perimeter of a Circle using multiple files. I keep getting an error for no declaration matches. I have been working on this f...
[5 replies] Last: Yes. I am required to add two custom exceptions which inheirt from st... (by XtremXpressions)
How to call function from within switch statement
 
Im composing a book based experience game. Im a gigantic noob to C++, did a Udemy course yet didnt see its greater part, so am doing this game and whenever I am...
[6 replies] Last: @Ganado, agreed, I would also choose that approach. @OP, the example I... (by Ch1156)
Understanding String as member of class and linked list
 
I know this topic is not a new one since I've been stumped by it before, but I'm still having trouble understanding exactly what the issue is and what to do to ...
[7 replies] Last: FOUND MY PROBLEM helios (above) hit the nail on the head It's a simp... (by riversr54)
Not sure how to protect against a case where the user inputs a negative number?
 
Hello! We've been given test cases and one of the test cases is here you have to make sure that the user doesn't input a negative size for the 2D array. I'm...
[3 replies] Last: (1) What is the type of m_size ? (2) You're showing a copy constru... (by Ganado)
Redefinition of int main error
 
So I have to make programm where user can choose 1 form 3 cases. I'm this far and it shows error in line 53. - error: redefinition of 'int main()'... Any sugge...
[1 reply] : [quote=frog1990 ]So I have to make programm where user can choose 1 fo... (by MikeyBoy)
Editing an initialized struct member using fstream
 
Hello guys. I am stuck in the code where I have initialized the struct member but I don't know how can I edit or delete it in a txt file. (Is this possible?) Si...
[2 replies] Last: Not sure I really understand what you are trying to achieve. For proce... (by seeplus)
How to forbid program to generate number if it's in vector list?
 
Hello world! I'm new here and new to C++ as well (doing online course for 4 days right now and tinkering with C++ in visual studio myself). I'm currently traini...
[9 replies] Last: Using <random> in C++ is far easier for generating general 'random' nu... (by seeplus)
empty the value inside an array
 
hi i have my main menu and sub menus each of it appears in new screen my problem is when im in stack menu for example i input an element then choose exit my pro...
[5 replies] Last: hi seepluss im sorry for that i did these two separately at first the... (by seeplus)
by colt
To compare a char variable to its hex value?
 
Hello, I am making a program that reads a bin file and stores it in a char array. Then I have to check each char value to then decided what to do. For instanc...
[3 replies] Last: @jonnin, Before the char is compared to the int 0xD8, the char is conv... (by dutch)
Print string * int
 
So, i know this is probably another stupid question, but how would i print a string * an int. Something like: #include <iostream> using namespace std; int mai...
[8 replies] Last: Setting up SDL 2 on Visual Studio 2019 Community: https://lazyfoo.net/... (by dutch)
by Mif
Why error message doesn't appear when memory could not be allocated?
 
Hi everyone, I'm new to C++ and at chapter "Dynamic Memory" there is an example with how to use new and delete to allocate memory, but even if there is a messa...
[14 replies] Last: try/catch are a part of C++ exception handling. https://www.tutorials... (by deleted account xyzzy)
Reading every string in program
 
How to read every string in a visual studio program? I need to read all of them, preferably at the same time, searching for a certian phrase. Something like: ...
[3 replies] Last: This simplified example won't take care of raw string literals, won't ... (by JLBorges)
bank account
 
i need to do a program that simulates a bank account without using classes and objects, but using functions etc the program has to do all a bank account does d...
[3 replies] Last: If you would like to make a little login and registration system to it... (by HypeCoderPanda)
Recursive function
 
Can someone please explain to me step by step why is this code showing 32*23? I tried to understand it using the debugger in VS, but I just can't understand fr...
[3 replies] Last: salem, dutch, you are awesome! Thank you for your explanations. It is... (by Maria94)
how to return in main menu from sub menu
 
hii i need help.. when im in stack or queue menu when i choose exit i need to go back to my main menu without using a goto statements and in a new screen. i ...
[9 replies] Last: Hello azalea520, No worries. Sorry for the delay I had to go out for ... (by Handy Andy)
Can somebody help me with the task?
 
Write your question here. I must do a task for my education, but I don‘t know how I should begin. It would be nice, if someone could help me. :) Here is t...
[3 replies] Last: Read the assignment once to get a sense of what's needed. Read it aga... (by dhayden)
How to step up the learning process? What to do next!!
 
i have been learning c++ for past 2 months. i have learned the basics ie- classes,structs,functions etc... and also made quiet a few beginner programs which use...
[8 replies] Last: @seeplus i wasn't learning from any book , i used various tutorial web... (by Reddevil1003)
February 2021 Pages: 1... 56789... 12
  Archived months: [jan2021] [mar2021]

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