Beginners - July 2018 (Page 4)

Help debugging classes.
 
Hello. When i compile the following code it runs just fine. #include <iostream> #include ...
[6 replies] Last: using std::string; is less bad than using namespace std; in a head... (by MikeyBoy)
Homework help
 
Hi ,so I started on this homework but I'm having trouble finishing it and I was wondering if I could...
[2 replies] Last: Hello gentrybryant, At first check the variable "ID" is undefined in ... (by Handy Andy)
by clonxy
2d array in classes
 
Can someone please look at my code? My professor gave us main.cpp and expects us to be able to code ...
[2 replies] Last: return (rows,cols); This is wrong. (by Repeater)
Using Sentinel Values In A While Loop
 
I need help with counting the months in my code. I always end up with 1 more month than i need after...
[3 replies] Last: #include <iostream> int main() { int num_months = 0 ; long l... (by JLBorges)
Help with constructor.
 
Hi, can these two codes be used interchangeably? If not, what is the advantage of one over the othe...
[4 replies] Last: also note that the constructor (example 1) reused set name, this is go... (by jonnin)
Classes and arrays
 
Hi. I am trying to write a database on c++ to practice classes. I've created a class called Personal...
[2 replies] Last: standard c++ does not allow a variable for array size because it is su... (by jonnin)
Debugging - What is it and how to do it? Basics?
 
Hey Everyone i've been pointed out several times that i should learn how to debug a program. The thi...
[2 replies] Last: Beyond the debugger, it becomes an art that you just refine by practic... (by jonnin)
by t009
Can't find documentation of ": " in for(... : ...)
 
This is my first encounter with it //points is a vector for(int p: points) ost<<....<<endl;...
[2 replies] Last: range-based for loop; lots of languages have it https://en.cppreferen... (by icy1)
by Gakus
Error when running my code
 
Hello folks, I'm very new to C++. My problem is that when I run my coded below on Xcode, I get a fol...
[5 replies] Last: Please DON'T delete your code after you've got the answer to your ques... (by MikeyBoy)
by b3y0nd
Creating Arrays with user inputed index and elements
 
First time running an array with user input. want user to define the maximum number of array elemen...
[1 reply] : 1) In C and C++, function arguments are passed by value. The num1 ... (by MikeyBoy)
C extern function returns incorrectly
 
Hi, Previously on my programming project, The returnValue in Init.cpp is about 4.1. When it is ret...
[3 replies] Last: Please DON'T delete your code after you've got the answer to your ques... (by MikeyBoy)
Confusion in Pointers (1,2)
 
Code 1 works perfectly fine, then why not code 2.As, i can see *p+1 is not a valid operation in co...
[21 replies] Last: Also, on g++, make sure you compile with warnings enabled. For example... (by Ganado)
sqrt issues
 
Hello all, I am working on teaching myself to code and have hit a wall. The top code gives me the sq...
[5 replies] Last: The amount of time I spent on that is now embarrassing, considering th... (by Triad0226)
Getting WA although the question statement seems pretty basic
 
Write your question here. Jitendra has won a lottery of K rupees. He wants to utilize this money op...
[11 replies] Last: @iamdad3 i have looked all the condition still getting wrong answer ,... (by shubhum)
Iterator pointer question
 
I'm so confused right now. Why does my iterator (*it) = _NODE[ListPOS crashes. Can someone expla...
[1 reply] : There are several possibilities. it could be uninitialized, invali... (by Peter87)
Single logical operator / SDL2 Question (No need to be familiar with SDL2)
 
Hi!.. *No need to be familiar with SDL2 but it would help to clarify some stuff. I was going thr...
[1 reply] : | is bitwise OR. Consider the following operation (binary (decimal)): ... (by helios)
T table of n rows and m columns
 
I'm supposed to create a program that allows adding the number of positive elements and the negative...
[4 replies] Last: "T" is usually type, like int, double, string, any class, etc. If you... (by icy1)
by Houd
Weird Class/Function File Interaction
 
I have a weird problem that only appears when I split the program into multiple files and pass by re...
[15 replies] Last: VS is dumb, I had too many dumb things happen that does not happen on ... (by Houd)
major or egual problem
 
hi guys, can't get why in the last function("QUICKSORT", that is a way to order a vector using the p...
[4 replies] Last: do you really code like this? (by seungyeon)
okay, so we have solution. Why does it work?
 
Here's my favorite solution to the pinned "Console closing down" issue. It uses what should be an in...
[2 replies] Last: The pinned "Console closing down" issue is completely different, and, ... (by icy1)
July 2018 Pages: 123456... 17
  Archived months: [jun2018] [aug2018]

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