[try Beta version]
Not logged in

Beginners - April 2019 (Page 17)

2D Array with Restricted bounds
 
I have a 2D bool array with 400 elements with a random assortment of spaces " " and asterisks '*' wh...
Apr 11, 2019 at 2:22am
[12 replies] Last: I figured it out. Just had to remove a couple of the equal signs in th... (by stoneJax)
Splitting an array in 2
 
Hello, I'm having a bit of trouble starting the code for a project. The problem states that you are...
Apr 10, 2019 at 10:09pm
[7 replies] Last: You tell me. Right now, you're incrementing j and k with every loop. ... (by Repeater)
by vysero
Help to understand how this function works.
 
I have a bit of code here that seems to me to be searching the wrong place for a specific program ca...
Apr 10, 2019 at 10:00pm
[5 replies] Last: Yes and I believe as a double, triple fallback it has 2 other programs... (by vysero)
namespace without name. I do not understand
 
Why would I write a namespace without name: namespace { double d = 88.22; } And not directly: dou...
Apr 10, 2019 at 9:11pm
[7 replies] Last: Okay, I was getting confused by a footnote attached to the section on ... (by closed account z05DSL3A)
by sturk
overloaded function declarations
 
Can someone explain to me why is foo(5,6) wrong and why the rest are correct? I don't understand. Th...
Apr 10, 2019 at 8:20pm
[6 replies] Last: Okay, so it looks like foo(5,6) works because it matches foo(int a,... (by dhayden)
Deletion of a pointer array of parent class (Inheritance)
 
Hello, following is the test program I created. I have tried to dynamically create objects of deri...
Apr 10, 2019 at 7:05pm
[3 replies] Last: Any parent class's destructor should be virtual . (If you are using... (by Ganado)
by sturk
Instances of class
 
May I know why's the answer 3 and not all? I guess I do not quite understand. Could someone explain ...
Apr 10, 2019 at 5:38pm
[6 replies] Last: Is that a standard, to call the value of the pointed variable the “... (by Ganado)
by tanja
Storing class objects in a vector declared in another class is not working
 
Hi, i don't understand what i am doing wrong here. i declared 2 classes A and B. B is supposed to h...
Apr 10, 2019 at 3:37pm
[10 replies] Last: I’ve split keskiverto’s code into 5 files and it compiles and exec... (by Enoizat)
by sturk
Declarations of functions
 
Can someone explain to me why void foo(int a, int b=3,int c) is wrong? and why the correct ones are ...
Apr 10, 2019 at 2:43pm
[1 reply] : Default parameters start from the right most parameter and once you ha... (by jlb)
by sturk
Overloaded operators
 
Can someone explain to me why the codes below give an error? Thanks! Given the following code:...
Apr 10, 2019 at 2:32pm
[2 replies] Last: You cannot change the meaning of operators for built-in types. When ov... (by Peter87)
TIME LIMIT EXCEEDING
 
There is a field with plants — a grid with N rows (numbered 1 through N) and M columns (numbered 1...
Apr 10, 2019 at 1:49pm
[8 replies] Last: don't know what was thinking the first time, binary search should have... (by ne555)
by kenken
Euler Project # 1
 
Can someone help me see the error in my logic. Problem: Find sum of multiples of 3 and 5 less th...
Apr 10, 2019 at 1:39pm
[3 replies] Last: Thanks JLBorges and Repeater! (by kenken)
Strange Exception Throwing
 
Somehow the following code throws an exception: 'Exception thrown at 0x00000000 in GL.2.exe: 0xC000...
Apr 10, 2019 at 12:28pm
[2 replies] Last: glfwInit() and glewInit() need to be called prior to buffer generati... (by calioranged)
Array Sort
 
/****************************************************************************** ...
Apr 10, 2019 at 12:09pm
[3 replies] Last: what exactly do you want to accomplish? heap is good -- if your stated... (by jonnin)
Why do I get errors when I try to modularize my code?
 
It runs fine when everything is in one file, but when I put the class, header, and driver in differe...
Apr 10, 2019 at 10:56am
[2 replies] Last: When you get multiple errors it's always best to start with the first ... (by Peter87)
Classes in C++
 
Hello, I have a question regarding classes in C++. As far as I've understood the built-in types lik...
Apr 10, 2019 at 10:22am
[5 replies] Last: There's some imprecise language being thrown around here, and that can... (by MikeyBoy)
Values of a loop displaying twice?
 
I seem to be having an issue with the values of a loop appearing twice. Here is my code, I am cur...
Apr 10, 2019 at 6:38am
[4 replies] Last: The loop on lines 94-97 are inside the do-while loop so the inventory ... (by Peter87)
by Dee5
Please,can someone hlp me to shorten this code using arrays?
 
#include<iostream> // std, cout, endl #include<fstream> // ifstream #include<cstdlib> // exit...
Apr 10, 2019 at 5:27am
[9 replies] Last: This is a good opportunity for you to learn about the standard library... (by JLBorges)
Constructor
 
I am trying to understand what does this line of code means. I know is a constructor but i dont un...
Apr 10, 2019 at 4:05am
[1 reply] : ... (by Duthomhas)
by arg57
In DisArray over this Array
 
I'm new to this site and have only been learning C++ for a couple months I'm having a problem with ...
Apr 10, 2019 at 2:56am
[4 replies] Last: подскажите литературу для начинающей... (by deleted account xyzzy)
April 2019 Pages: 1... 1516171819... 24
  Archived months: [mar2019] [may2019]

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