[try Beta version]
Not logged in

Beginners - June 2019 (Page 3)

for
 
Hello, I want to ask, for(int i = 0;i < many;i++) { getline(cin,other .name); } cout << other...
Jun 25, 2019 at 5:10pm
[2 replies] Last: Your second example is using a copy of your array, so any changes made... (by deleted account xyzzy)
matching a string to struct value in an array of structs
 
Currently I have a working heartbeat client that will echo a key to the server. The issue i'm runni...
Jun 25, 2019 at 3:02pm
[3 replies] Last: The following is not allowed in standard C++: while (getline(CLIE... (by jlb)
DP (1,2)
 
A function is defined as f(n+2) = 2*f(n+1) - f(n) + 2 , if n is even f(n+2) = 3*f(n), if n is odd f...
Jun 25, 2019 at 6:18am
[20 replies] Last: @counter strike it gives answer of 70282652 but answer is 26030209 T... (by SparkXV)
Need help adding a Yes continue/No end program loop
 
I don't know how/what/where to add a loop to continue if you type Y or end the program if you type N...
Jun 25, 2019 at 5:02am
[2 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> int main() {... (by JLBorges)
cin ambigous error
 
getting a cin ambiguous error and else "expected a statement error" everything was working until I ...
Jun 25, 2019 at 3:56am
[2 replies] Last: That fixed it, thank you so much! (by hjabba89)
Calculation
 
How do I do the calculation for "width * height * length" #include <iostream> #include <fst...
Jun 25, 2019 at 2:19am
[1 reply] : Ok, clearly this is new to you. That's not a problem. First, since yo... (by Niccolo)
char array Memory deAllocation
 
Hello Guys i am bothered that my dynamic array is not de allocating memory and gives an error If i ...
Jun 25, 2019 at 12:07am
[7 replies] Last: Really leant alot Thank You (by Abdul hadi)
Philosophic reason for initializing members as apposed to initialization function??
 
OK gang, Back for more questions and I did look this up FIRST but was unable to really match a co...
Jun 24, 2019 at 10:34pm
[4 replies] Last: @Dutch might notice something, but my quick read is "yes", you got it.... (by Niccolo)
I created my self a decimal challenge accidentally but can you figure it out.
 
#include <iostream> #include <string> #include <math.h> #include <iomanip> using std::cout; us...
Jun 24, 2019 at 9:26pm
[5 replies] Last: All I know is the code above works, so does the bottom one. The probl... (by Shibitto)
Class can't access my vector
 
Still very new to c++ and programming in general. Although I've been picking it up quickly. However,...
Jun 24, 2019 at 9:09pm
[10 replies] Last: You get told a Bunny has died every time one is destructed. Bunny b... (by Repeater)
Error assigning struct value from getline
 
Currently I have a text file that consists of multiple names and keys deliminated by ";" like so: ...
Jun 24, 2019 at 8:29pm
[2 replies] Last: Thank you so much lastchance that solved it. Updated code for anyone e... (by foxxthegreat)
by Deluge
Char Data Getting Corrupted
 
I'm trying to create a type that has a char array and integer id members: class ResourceObject { p...
Jun 24, 2019 at 7:49pm
[8 replies] Last: sorry. I have a form of visual issue where front loaded variables all... (by jonnin)
by tinaHR
Drill from Bjarne's book
 
Hi all, i am going through Bjarne book and at the moment im doing chapter 4 drills. The program i wr...
Jun 24, 2019 at 7:36pm
[6 replies] Last: About bool and test I meant how come in int test = false; i can... (by tinaHR)
Exiting a loop early
 
Hi, I'm trying to print out the first number in a loop that doesn't exist inside an array of number...
Jun 24, 2019 at 4:41pm
[14 replies] Last: Input is tedious: size_t N {}; if ( !(file >> N) ) return 1; ... (by keskiverto)
Pointer
 
Hello, I want to ask When will we need to use pointer?? Actually what is the benefit of using ...
Jun 24, 2019 at 4:28pm
[5 replies] Last: pointers and their power don't really make sense until you understand ... (by ICantC)
getline
 
Hello, When I use getline(cin,var) sometimes it is skipped. Why is it skipped?? I know there is c...
Jun 24, 2019 at 4:24pm
[1 reply] : If the stream is valid it is not skipped. It may be called at a point... (by lastchance)
If else statement (1,2)
 
I'm struggling with a code and I'm using if/else statement. I'm extremely need to coding here so bea...
Jun 24, 2019 at 4:22pm
[34 replies] Last: [quote=Cjigsaw]I do hope I can pm you to pick your brain. Why would y... (by MikeyBoy)
Dynamic programming
 
https://cses.fi/problemset/task/1746 I have thought of this question for a while now, can't reall...
Jun 24, 2019 at 3:32pm
[10 replies] Last: Basic shape is a rhombus. a * * * * s * ... (by dutch)
If setw sets "minimum field width", why does it limit input or output?
 
If I write: 120 450 340 as input, I only get 120 back. I don't get it. int main() { int x...
Jun 24, 2019 at 3:13pm
[1 reply] : The setw() is irrelevant here. (For an input stream it is only relevan... (by lastchance)
Merging two of c++ games into 1
 
Our prof gave us two game program one is Snake and the other is Dinosaur. he required us to merge tw...
Jun 24, 2019 at 10:19am
[1 reply] : Sure, you rename the two main functions to be playSnake() and playDino... (by salem c)
June 2019 Pages: 12345... 13
  Archived months: [may2019] [jul2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.