Beginners - January 2018 (Page 2)

Program crashes after populating array
 
I am trying to make a simple game with multiple players, but the number of players is determined by the user. The number is passed into an array where the names...
[2 replies] Last: Thank you, I can't believe I overlooked that. (by DocterHow)
Why when I display doubly linked list data I have nothing?
 
Hello, I have created a simple doubly linked list for a telephone directory program. When trying to display the items in the linked list I have only one out...
[5 replies] Last: In push_back, what if there is already an item in the list? You need t... (by dhayden)
Need help(won't read the array)
 
Hello, So this is part of my homework. I have been stuck on this code for hours now. I feel like I've tried everything or that I am just missing something super...
[2 replies] Last: fixed it myself finally!!!!!!! (by lolskyy)
Array problem
 
Hello. I tried to do this simple "calculator" but it doesn't work the way I want. It gets result right but the first three numbers from the array are weird. Why...
[2 replies] Last: Thanks you very much :) (by Lager159)
Function accepting arguments of objects with 2 arrays
 
Hello again! I've almost figured this out, but I'm confused on how to pass some arguments to my function. Below I have a function multiplyArrays(Time). It ac...
[1 reply] : You would pass it in the same way you pass in any other variable. How... (by Ganado)
Basic Looping Issue
 
Hi there, pretty new to C++. I'm trying to write a program where I make two different arrays of random numbers, find the range (difference between largest and s...
[3 replies] Last: Arrays are old stuff for me. They go back decades - since the first ve... (by Thomas1965)
How can i save on an int or a char depending by the input?
 
I still didn't figure out how to do it yet. Imagine that you can input everything you want, but when you input 2 the number gets saved in a variable int and if ...
[2 replies] Last: Thank you! It's kinda like emu8086 :) (by Luca Strano)
Dynamic Programming Coin Change Problem
 
I am having an issue with my coin change program. The idea behind the program is to take input from a text file which will be coin values and an amount and fine...
[1 reply] : #include <fstream> #include <string> #include <vector> //function to... (by Enoizat)
c++
 
Can someone help me get started with this RockPaperScissors Game * Requires: player_number is either 1 or 2 * Modifies: cout, cin * Effects: Prompts the...
[2 replies] Last: Hello offset221, The following gives you a place to start: * Requir... (by Handy Andy)
REST API
 
Hi there, I am just wondering: can I make REST API calls using C++? If yes then where should I look for more information, if no then maybe someone can suggest s...
[1 reply] : can I make REST API calls using C++? Yes you can. If yes then where... (by Thomas1965)
Help! I need code explanation
 
Hello, guys!! I have to answer what will the variable values be in the following code, but I do not understand it. #include<iostream> using namespace...
[2 replies] Last: Here is the code with indenting and some output in the constructors an... (by dhayden)
by mdz
range error
 
Hi eveyone, as a beginner in both this forum and c++ please bear with me. I have two vectors of the same type which is a class, one copies part of the other vec...
[2 replies] Last: I'd recommend to try and avoid those kind of errors, as for their high... (by benhart)
Possible Issue with Compiler?
 
Hello, I am having an issue trying to use the <iomainip> library. When I try to include it in my code it says that the library isn't found. It was my understand...
[2 replies] Last: Do you mean <iomanip> ? You do mention your IDE but not the compiler ... (by keskiverto)
Run error.
 
I wrote a program for class but it never runs correctly, it just gives me that blank black screen with a blinking cursor. The .txt file is in the Resource Files...
[2 replies] Last: guessing that your file failed to open, which would bypass all the cod... (by jonnin)
If I use spaces in a string, it trails over into the next string input
 
I am using strings, but if the user includes spaces in the input, the next word after the space is used as the next string input. Even if I use cin.ignore, this...
[4 replies] Last: If there are an unknown number of words in the string, use getline. ... (by lastchance)
by al8888
deep copy incremented values incrementing to much
 
Hi I'm doing a chapter on deep copy in my book and the question asks me to create two objects one with a default value and deep copy it and then change the valu...
[3 replies] Last: Ok thank you kindly for your help, (by al8888)
Reading from a text file
 
Hi! I'm trying to read from a file but I'm doing something wrong. If someone can help me please. #include <iostream> #include <fstream> using namespa...
[6 replies] Last: Hello Trixypu, You are welcome. If you have your answer be sure to p... (by Handy Andy)
by gn4cys
Learning curve & progress question
 
Hello, I need feedback as to my progress as beginner and if i am correctly approaching learning process. I am total novice. Before starting C++ i only tou...
[3 replies] Last: Thanks. Both answers are very helpful. JLBorges answer is also very m... (by gn4cys)
by Millet
Homework
 
I need help with the question below. My answers are posted below the question, but I'm not really sure if they're correct. If anyone could help me out, I'd real...
[2 replies] Last: Hello Millet, in addition to what chicofeo said in "b and d" as I hav... (by Handy Andy)
by Bow
hello my friends
 
can someone locate what have i done wrong ? // forth2 #include <iostream> #include <string> using namespace std; int main() { string matestring; ma...
[3 replies] Last: Oh , you are right . thanks a lot guys!! (by Bow)
January 2018 Pages: 1234... 22
  Archived months: [dec2017] [feb2018]

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