Beginners - December 2020

I don't know what a unique algorithm is
 
Read 20 integers into an array. Next, use the unique algorithm to reduce the array to the unique values entered by the user. Use the copy algorithm to display t...
[4 replies] Last: #include <iostream> #include <sstream> #include <iterator> #include <... (by lastchance)
C++ skips all cin statements
 
I'm a beginner in C++ and I wrote this simple code: #include <iostream> using namespace std; ...
[3 replies] Last: Hello waturiuiuiuizifa, What found is that following #include <iost... (by Handy Andy)
Problem with code
 
Hello again! I have two problems with an exercise I've been trying to cope with. My first problem is how to create a constructor which will increase the num...
[7 replies] Last: Seeplus thank you. I haven't yet writen any code in main as my compil... (by seeplus)
Error in code
 
Hello once again guys! I have one more problem regarding another code of mine. My code is given below and the problem is that when I run the code I does not pri...
[10 replies] Last: Hello geovoulg, You are welcome. Any time. Andy (by Handy Andy)
Accessing a vector from another class
 
Hello, I am trying to make a little console based game, and i need a vector that holds inventory items that end boss' can hold. I do not want this vector (v1)to...
[4 replies] Last: It's fine. People here are a little trigger happy because you will get... (by Ganado)
by hbcpp
Detect USB Storage Devices On Insert
 
I want to create a console application that detects when I insert a usb on my pc and then it copies itself to that usb storage device. It also has to detect if ...
[11 replies] Last: Thanks guys!! However, I found the solution that works for me and it ... (by hbcpp)
Accessing a vector from another class
 
Hello, I am trying to make a little console based game, and i need a vector that holds inventory items that end boss' can hold. I do not want this vector (v1)to...
[2 replies] Last: Statics like this get initialized on global scope. So 'inventoryContai... (by Computergeek01)
wonder if the following code is correct!.
 
Hi everyone, I am sorry that the following code is a combination of both C and C++. Regardless of this, If you have any advice to improve or to make the code m...
[4 replies] Last: Dear Dhayden, Thanks for your message. I am sorry for the late reply. ... (by shafiul0304034)
Override [] operator for a class
 
Hi, I have a Basket class, containing Apple objects, stored in an Basket. A Apple object is described by coordinates x, y. I'm trying to override the operat...
[3 replies] Last: Yes, but if I want to use objects on the heap? Dereference your Arr... (by mbozzi)
Max among the coordinates of one vector
 
From the vectors v1, v2, v3 choose the vectors (one or more) that have the largest max among the coordinates. In the selected vectors replace this max with the ...
[4 replies] Last: I swear this same question has been asked 8 different ways in the past... (by markyrocks)
by NowIC
Program does not execute
 
Hallo. I wrote some code for learning C. Still a beginner. The problem is if the problem line is active I get no output of the program. When I comment it o...
[4 replies] Last: By "Visual Code" I assume OP means Visual Studio Code , this amazingl... (by mbozzi)
by kmce
printing to file with functions?
 
Is it possible to use a function to pass data to a out stream to put it into a file? I have a return name function, which simply returns the name that I wan...
[12 replies] Last: The original code was: myOutStream << obj.getName(); As the func... (by seeplus)
Delete a row in a dynamically allocated multi-dimension array
 
in this piece of code i have a matrix and if a sum of a row is not even, i have to delete it, but how to delete a row in a dynamically allocated multi-dim array...
[7 replies] Last: Thank you very much everyone! (by izlezotfilma)
Write multiple lines to a text file and Read the file with all the characters reversed
 
Hi guys i'm trying to write a programme as follow: Write a program that: 1) Prompt the user to enter a file name to save the inputs. 2) Prompt the user to ...
[8 replies] Last: Hello imyourjoy, Your while loop may not work the way that you want. ... (by Handy Andy)
Abstract class question?
 
I want to try practice a few things that I have learned by making a very small simple console based game. I was going to make 3 characters, player, enemy and en...
[2 replies] Last: > but is it normal for an abstract class to have all of its functions ... (by JLBorges)
This is probably more of an intermediate problem....
 
My issue isn't so much with the function as it is to do with the data after the function returns... SetupDiGetDeviceInterfacePropertyW( _In_ ...
[3 replies] Last: I keep grinding away doing my research etc. Its amazing to me that no... (by markyrocks)
C++ Class
 
So i'm trying to make program using class. I need to make this to work by using set/get....I'm stuck here and still it does not work.... #include<iostream>...
[1 reply] : date_1, date_2, and date_3 are ints, not Date objects as you seem to s... (by Ganado)
by luqcpp
Write a program that uses a stuct named MovieData to store the following information about a movie.
 
//The program should create two MovieData variables, store values in their members, and pass each one in turn, to a function that displays the information about...
[2 replies] Last: Hello luqcpp, PLEASE ALWAYS USE CODE TAGS (the <> formatting button... (by Handy Andy)
One dimensional arrays
 
Hello! How do I make a program in C++,in a one-dimensional array consisting of n integer elements, calculate: -number of paired elements standing in even places...
[13 replies] Last: Perhaps something like: #include <iostream> #include <numeric> #inc... (by seeplus)
by PK Dey
Namespace error!
 
Hello every one! Nice to meeting you on this forum. I am new here also in C++. I have the following question- Why the following code showing "namespace name e...
[7 replies] Last: Someone took it over as a project but nothing from borland is newer th... (by jonnin)
December 2020 Pages: 123... 11
  Archived months: [nov2020] [jan2021]

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