Beginners - May 2014 (Page 48)

Array - cant't find the smallest number
 
I'm assigning values from 0-30 to an array and expecting it to tell me that the smallest element is element no. 0, with the value of 0. But it tells me that the...
[4 replies] Last: [quote=wakadarc]You didn't declare values for high and low so they can... (by cire)
No instance matches the overloaded function
 
The error is "No Instance of overloaded function ... matches the argument list" I understand that i give wrong argument to the erase function, but i do not kno...
[2 replies] Last: Thank you (by ZankerTheGreatest)
calculator
 
Hey guys, making something that asks for input and returns whether it is a power of two or not. It also returns which power of two it is, and thats what im havi...
[4 replies] Last: ahh thank you (by josepho16)
Understanding operators
 
So I can't understand how this works: Here are 3 classes: 1. class L { public: int t; L() { t = 0; } virtual ~L() { cout << ++t << " "; } void i() {...
[3 replies] Last: For example what means L l;? and etc This line simply declares a o... (by CodeGoggles)
Debugging issue
 
With what I have so far, I will type in north, and because it is out of bounds, it prints to screen that I can't go that direction. Then, on the next loop throu...
[7 replies] Last: DERP. Always the simplest things i swear, thank you! (by closed account 3R5fjE8b)
by Light1
Transformation from int to char*...
 
Hello When i try to compile this program, it shows me this: conturi.cpp: In function `int main()': conturi.cpp:16: `to_string' undeclared (first use this...
[2 replies] Last: also, you shouldnt do variable size arrays until c++14 compliant compi... (by Little Bobby Tables)
const return type?
 
I assume that when a function is declared like below. The const keyword marks the return type as constant. Am i correct in this assumption? int SomeFun...
[2 replies] Last: Ok, thanks for the reply Peter87. (by CodeGoggles)
pushing array usinng bitwise operators
 
Lets say I have an int array[ 5 ] = {4,3,2} and I want to put a five at the start. It would look like {5,4,3,2}. One way would be to take a one value and put i...
[3 replies] Last: Found it already in the tutorials, thanks (by closed account 2AoiNwbp)
Arrays of references
 
Hello there! I have a question that may be pretty trivial but I really have no idea whom or where else to ask it, so I thought the beginners forums here would b...
[1 reply] : why does C++ export the changes made to the parameter of a function (... (by Cubbi)
Classes make interface funtion know
 
So as you can see I would like to make the read function known to the class, as I`m using it in a constructor in the class, it`s an exercise so I would not like...
[1 reply] : ok guys I was really stupid. I declared the class before read and it w... (by closed account EwCjE3v7)
Problem with rand_max
 
I want to generate random numbers between 1-10. I thought this was accurate code. But, in every case I get a really large number. In one case I got tall1 = ...
[3 replies] Last: &tall1 gives you a pointer to tall1, but a pointer type does not match... (by Peter87)
by h4ever
help remove errors in program
 
Can you help me remove these errors? I try to start to build program, one of my first tries, to capture content of window... I took this script which originally...
[8 replies] Last: Can you help to solve unresolved external problem in program using GDI... (by h4ever)
by strife
not a member of std
 
This problem has caused me hours of getting nothing done over the last 2 days... If i make my own class and include a library in the .cpp, I keep getting ONE of...
[4 replies] Last: I need to learn more about what happens when you make a class! You ... (by Peter87)
BST first minimum numbers
 
Question : why does this code work for first minimum numbers work when i write the two conditions in one if statement but doesn't work when i write it in two ...
[3 replies] Last: int Min(int count, Tree *temp) { if (temp == nullptr || count <= ... (by Smac89)
by Ram1
class Stack
 
Following is the definition of a class called Stack. Create a header file with name Stack.h and copy the following code into the file. Complete the header file ...
[1 reply] : So...what part of this do you not understand? (by PrivateRyan)
In programming, do line and statement mean the same thing?
 
In programming, do the terms "line" and "statement" always mean the same thing?
[2 replies] Last: In C++ a statement ends with semicolon ; so it can be in multiple line... (by closed account 2AoiNwbp)
When calling a function is it possible to use the same input used in the main function for the one I am calling?
 
Hello everyone, This is my first time using this forum, I dont know how Im supposed to ask questions, or how does this work. Anyways, I kinda need an explanati...
[2 replies] Last: > When calling a function is it possible to use the same input used in... (by JLBorges)
by wolfv
inheritance function override question
 
I am trying to use polymorphism to override a function. In the following example, I want Der::print() to override Base::print(). I expect der.func() to print ...
[2 replies] Last: Thanks long double main, that worked! (by wolfv)
Link list help
 
Having issues with putting it in first name order. If i were to take out the code for the first name order it'll work in last name only, but it keeps pushing it...
[no replies]
Help with string arrays
 
Hi, I'm taking an intro course in C++ and I'm having trouble grasping string arrays. Specifically I need help with an assignment involving a grading program and...
[8 replies] Last: Ah wow thanks for the heads up on that! I didn't even think about if a... (by Kkextreme)
May 2014 Pages: 1... 4647484950... 55
  Archived months: [apr2014] [jun2014]

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