Beginners - October 2014 (Page 48)

by arraan
Question about run length encoding, encoding part.
 
Hello! cplusplus forum I have a problem with the encoding part of RLE, I just started programming. The problem is in the ´void coderen ()´ part. The thing...
[2 replies] Last: ah i see, thanks for the quick reply, Peter! (: (by arraan)
by akai09
one more question
 
hello guys i need help with this. im bit confused........ assuming a= 2 b= 3 c= 4 d= 5 why when i had if (!(d = 4) the output of d changes from 5 to 4? and wh...
[2 replies] Last: = is the assignment operator. d = 4 will assign the value 4 to th... (by Peter87)
default argument
 
Can someone tell me what a default argument is in a function? bool isLegal(int age, int minAge = 21) { return age >= minAge; } legal = isLegal(age); // sam...
[3 replies] Last: This is legal int minAge = 21 (by closed account SECMoG1T)
I can't make my program ignore input with extra spacing, it only gives up error.
 
Hi everyone, I'm writing an airline seating program and they demand that you should be able to write an entire line at once. I.E. The input 3a y 3k y 3b Now ...
[1 reply] : Bump out of desperation. (by JoshiMoshi)
by HG319
Converting money into bills and change
 
I have a lab where I am asked to take an amount of money and convert it into the types of bills and coins. We only have an infinite amount of US $20, $5, $1, 50...
[1 reply] : Yeah. It's floating point rounding error. You should probably ask the ... (by TheKingOfTyrants)
AVL deletion when node has no children or 2 children
 
Hey guys I'm working on my deletion function for my AVL tree and cannot seem to figure out how to make it work correctly. I think my main issue lies in my imple...
[no replies]
Displaying values in reverse order and from smallest to largest (HELP!!)
 
Hey guys, so I'm starting to learn C++ at Uni and I'm doing one of these questions in tutorial to help you grasp what you learnt in a lecture hall and I've hit ...
[13 replies] Last: @Kemort soon as i can figure out why my visual studios has decided to... (by Collwyr)
C++ Book For Begginers
 
I've decided to let go of learning the C programming language and learn C++. Can anyone recommend me a good book aimed at beginners that have never programmed ...
[10 replies] Last: a free and beginner friendly e-book: http://it-ebooks.info/book/3586/ (by Jacobhaha)
Should I learn OpenGL/DirectX next?
 
Hi. So, I've been learning C++ and I think I have a relatively good progress so far. I went through C++ itself, then learnt some QT, other libraries. Doing fi...
[no replies]
loop counter
 
I'm very new to c++. Is there a way to count of the number of times a wile loop iterates? And capture the number in a variale??
[4 replies] Last: Thank you. That's all very helpful. Now to be a little more specific. ... (by dunnDolphin)
Variables between classes and main.
 
So I have a project(tic tac toe) for a class that involves our first use of c++ and I need some help with classes. Can I use variables/arrays between classes? a...
[2 replies] Last: ok, this is my first time using classes without even being taught how ... (by bman364)
Beginner question about cin.ingore
 
Why is cin.ignore(1000, 10); used after cin >> variable; if the computer is executing in sequential order ? Isn't the computer supposed to know about the buffer...
[1 reply] : cin.ignore(1000, 10); Do not do that. '\n' literal is there for ... (by MiiNiPaa)
Iterative/ recursive help
 
I need to write the iterative and recursive versions of a function that takes in two vectors a and b, both are vector<int>, and returns whether a is a sub-vecto...
[no replies]
How can I make 3*3 array?
 
Dear Friends, Would you please help me with the code below? I want to make a 3*3 array. I mean 9 times the code ask me the t and it calculate the acc and put ...
[8 replies] Last: Thanks for your comment. There is still error in lines 13 and 25 1-I d... (by spring2014)
String over Character data type when validating
 
How can I use a character in input validation and make it so that it doesn't accept anything other than the valid input. For example: I prompt the user... ...
[4 replies] Last: the example you provided still uses strings if i'm not mistaken.. (by cyprusforever)
Printing Array
 
Hello everyone, I'd like to ask, how should I print an array? I'm not sure which part is wrong though... if (R%2==1) { for (y=0; y<R;...
[1 reply] : If you want to print each element of the array you will probably need ... (by jlb)
by St4be
Temperature Conversion
 
Hi. I am trying to program a temperature conversion program for a school project. It needs to accept and convert between Farenheit, Kelvin, Rankine, and Celsius...
[7 replies] Last: What loops are you talking about, I don't see any in your code? I do ... (by jlb)
Value Returning Factorial Functions
 
My program won't run b/c I'm getting an error that "function 'int factorial(int)' already has a body". Also, I'm not sure if I declared the variables in their...
[6 replies] Last: Great, thanks I will implement these fixes over the weekend! (by JoJodoggy1)
How do we know that a compiler will use const_iterator?
 
Say for example i have this code class SceneNode { public: typedef std::unique_ptr<SceneNode> Ptr; SceneNode(); private: std::vector<Ptr> mChildren; S...
[11 replies] Last: > Const is sometimes confusing Does this alleviate the confusion? #... (by JLBorges)
by kg1
how to start programme
 
Write your question here. Hello world, I'd like to study programme in C++. But really don't know where and how to start. :-| Can anyone help? Hope to h...
[1 reply] : http://www.cplusplus.com/doc/tutorial/introduction/ Get cracking! Yo... (by megatron 0)
October 2014 Pages: 1... 4647484950... 70
  Archived months: [sep2014] [nov2014]

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