Beginners - February 2016 (Page 9)

Program skipping cin's
I am writing this program and it worked fine but since i added the selector it skips over the cin's in he input function. this used to work fine here is the co...
Feb 25, 2016 at 5:01pm
[2 replies] Last: thank you (by closed account Ey6Cko23)
by Frenzy
First Time trying to create Functions - Crazy Error Messages
Hey guys. I just started learning about functions in my class recently. I've been getting some really strange error messages when I try to compile. I can't even...
Feb 25, 2016 at 4:24pm
[6 replies] Last: Not sure if this makes a difference but my teacher taught us to compi... (by TheIdeasMan)
Loops and Arrays
OK I just looked at guides on how to do loops with arrays and did a rough sketch, I am getting errors on my if statements and my show all works but doesnt. Can ...
Feb 25, 2016 at 4:01pm
[3 replies] Last: so I'm thinking some kind of size of the array You need a counter o... (by AbstractionAnon)
Char array to int array conversion
Hello, i've been working on some encryption as a project and now i need to turn a char array into an int array. i also want to add an integer to every single va...
Feb 25, 2016 at 3:46pm
[6 replies] Last: @coder777 could you please explain this line: for(int i = 0; num... (by closed account Ey6Cko23)
Array not assigning correctly.
I need to implement some code into my program that changes the values of a 9 integer array, I tried using the following code but on my console screen it shows b...
Feb 25, 2016 at 3:32pm
[6 replies] Last: Yes! It is an array of characters! Damn I forgot about that. Thanks gu... (by Harutyun)
Returns from Function
I am new to c++ and need to write a program using multiple functions that will essentially carry out basic cash register functions. Below is the code I have so ...
Feb 25, 2016 at 3:28pm
[3 replies] Last: line 80: total is not initialized. line 20: main() should always r... (by AbstractionAnon)
Loop subtracts 1 day each time it loops.
My code is currently subtracting 1 and not outputting the correct day number of the year. Here is what I have so far. #include <iostream> #include <strin...
Feb 25, 2016 at 3:15pm
[2 replies] Last: @ne555 I'll keep that in mind but for now I'm going to comply with th... (by plsalinas)
by asya
Polynomial Array Overloaded Operator
I have the following assignment: Develop the class Polynomial. The internal representation of a Polynomial is an array of terms. Each term contains a coefficie...
Feb 25, 2016 at 2:54pm
[12 replies] Last: Don't give up. You've very close. Mostly simple mistakes that need to... (by AbstractionAnon)
Guessing game - code the player
So, i just started coding, and i got this assignment where i need to make a code where my program has 4 tries to guess a number from 1 to 10. My program has 4 t...
Feb 25, 2016 at 2:33pm
[2 replies] Last: You have extraneous semi-colons on lines 13 and 17 which makes your lo... (by cire)
Sort by grade AND by name
The problem is the following: While reading input from the keyboard, you will read a string and a number. The string is the name of the student, while the numbe...
Feb 25, 2016 at 11:49am
[4 replies] Last: @jib .. I was looking for a more complicated error but the answer was ... (by jgg2002)
Hi all!! I've just written some code for an assignment, and I have NO idea where I've gone wrong! Please help!!
Pretty self explanatory. I'll keep this short and get straight to it. Here's the assignment: http://imgur.com/HPPqFFr and here's my code: #include <...
Feb 25, 2016 at 11:40am
[3 replies] Last: As far as I'm concerned, I was always taught to close files upon progr... (by WakeofMisery)
2 programs I can't seem to figure out here
/* */
Feb 25, 2016 at 11:23am
[1 reply] : For the first program, consider creating an if statement inside the fo... (by WakeofMisery)
What is //NOLINT?
using namespace caffe; // NOLINT (build/namespace) I am a total beginner trying to understand this code. What does NOLINT do, exactly? I found online...
Feb 25, 2016 at 11:09am
[1 reply] : That's a comment. In this case, it's a comment designed to be read by ... (by Moschops)
operator->()
Hi, I have was doing one exercise where I have to implement some kind of interface so Container with some stuff but I stopped here! I got a bit confused what...
Feb 25, 2016 at 10:41am
[7 replies] Last: Tnx for an answer man. This is my bad that I didn't see it actually :... (by etrusks)
Command line arguments in Visual Studio.
I use argc and argv to get the name of the files but i dont know how to use the command line to pass it into the program. How do i get the command line to pop u...
Feb 25, 2016 at 9:42am
[2 replies] Last: If you run your project inside VS you can set the parameters under P... (by Thomas1965)
Why won't this print?
I have a function which basically sorts an array of 0's and 1's. The array initially starts off as: 00110011 and I want the array to be sorted to look lik...
Feb 25, 2016 at 8:24am
[2 replies] Last: I fixed the issue, my array was already sorted from calling a previous... (by alex067)
Deleting dynamic array
If you have a dynamically created array that is a single array, do you have to manually delete this array with: delete ... ? I was taught that any dynami...
Feb 25, 2016 at 7:19am
[1 reply] : When deleting a dynamically allocated array you should always use del... (by Peter87)
Why isn't my set setting?
I can't figure out why my set() isn't setting. There is no input, but my instructions were to "Always check for invalid client input in set() methods." This is ...
Feb 25, 2016 at 6:17am
[8 replies] Last: You're right! I've been coding for 7 weeks now and can't read my own w... (by itsbenbroughton)
by Rholar
List Insert function error
This program takes in two ordered lists and then combines them into one ordered list, then returns that new list. I am having trouble with the insert function....
Feb 25, 2016 at 6:16am
[1 reply] : Before C++11 you couldn't pass const_iterator to the insert function. ... (by Peter87)
How to pass a data member by reference from main?
So , I'm not sure how to do this. // class.cpp class A { public: void myFunct(vector <int>& myvect); protected: vector <int> my...
Feb 25, 2016 at 5:07am
[3 replies] Last: If the vector is a member of A, it is also a member of B. Why does yo... (by cire)
February 2016 Pages: 1... 7891011... 46
  Archived months: [jan2016] [mar2016]

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