Beginners - April 2014 (Page 24)

by xerx25
Keep on getting wrong answer for 3n + 1 problem
 
I think there is something wrong with my user input, I'm not sure. Thanks #include <iostream> using namespace std; int cyclerfunc( long int a, long in...
[2 replies] Last: I don't really know, what the problem is. Here is the 3n + 1 problem, ... (by xerx25)
by mjatt
[b]initialisation of members of structures in a dynamic array ??
 
initialisation of members of structures in a dynamic array ?? #include <iostream> using namespace std; struct exam { char name ; int roll; ...
[5 replies] Last: thnx @ Peter87 @ Void life (by mjatt)
creating a banner
 
Hi guys This might sound like a really dumb question, bout how do you create a banner in an object orientated C++ program. I know with procedural base you ca...
[1 reply] : For creation of banner/ticker you do not necessarily need OO concepts/... (by codewalker)
by kessia
How can I find the n smallest number of a set of numbers
 
Hey guys, I have this doubt for a while I'd like to know how i find the n smallest number of a set of number and not the smallest number. For example: I h...
[1 reply] : If you store the elements in a std::set you just need to iterate the f... (by Peter87)
Passing an array to the function?
 
I'm writing a code for the problem below and I have an issue with the function header, prototypes, and call in the main. I'm not sure how to pass an array to t...
[6 replies] Last: Okay I got it! Thank you so much (by aslan10)
by ag2505
Using vector as an array of strings for packman-type game
 
I neeed help with a packman-type game assignment These are the guidelines 1. Change the map array to a vector of strings. Remove the pre-initlization/premade...
[2 replies] Last: Do you know how vectors work? The easiest, most comprehensive resource... (by TwilightSpectre)
Vectors and Linked List
 
What is the purpose of vectors and linked list and how do you utilize them?
[4 replies] Last: This may also help if you are unsure. http://homepages.e3.net.nz/~djm/... (by giblit)
Morse code
 
i have no idea about y my code cant run successfully. it is just skip the input and print "No conversion was done due to an error". help meeeeee plzzzzzzzzz. ...
[11 replies] Last: i have no idea about "std" things.....however, thx (by passw0rd)
i need help please someone show me how to start this program
 
here is an assignment due in a few days ive been trying my harderst to understand exactly what i need to do but im having a tough time could someone please help...
[9 replies] Last: Your effort comes after that part I have provided you. (by LB)
Problem comparing bool values
 
I have something along the lines of Class A { bool foo; public: bool getFoo(){return foo;} } and then elsewhere void compare(A &a, A &b) { ...
[9 replies] Last: There is not much point in reading the IS like a text book. Learning ... (by JLBorges)
Error catching statement for data type string
 
Yeah... Today is my day of learning how to correct user input errors. I have it down with integers/characters. I can't seem to get it to work with strings. I...
[1 reply] : I fixed it. cout<<"Are you adding, removing or replacing an item?\n"... (by Bluebaron)
morse code
 
i have no idea y the output are all "A" and "B"...help me plz.. #include <iostream> #include <string> using namespace std; int main() { string...
[2 replies] Last: u code does not work, but i fixed it....however, thx (by passw0rd)
Error Catching Statement
 
A few questions with this menu template I made and would like to improve. Problem 1: My number one issue here is that if the user enters a character accid...
[7 replies] Last: Thank you! (by Bluebaron)
C++ Tip please
 
Basically I'm trying to make an "account recovery" program that ask max of 3 questions in order to recover a user password, if user gets "question 1" wrong it'l...
[4 replies] Last: @PrivateRyan Damn thanks bro, that makes it way more clear if I was t... (by InvulBox)
Read from a text file
 
May I have a good website I could visit for example on how to read from an unformatted Text File. Please and thanks.
[6 replies] Last: Well it all depends on how the information is stored in the file. To o... (by giblit)
While loop
 
How would I change this program so that if the user enters 'q', then the program ends? #include <iostream> #include <cctype> /* Input: Enter a grade,...
[3 replies] Last: What compiler are you using that allows void main ? As pointed out by... (by BHX)
Confusing syntax error for me
 
Very new at this. I tried to figure out what the problem was here but there is an error specifically telling me that there is no "if" before the "else" and I am...
[4 replies] Last: your welcome (by Stephanie16)
Not sure how to use functions and pass arguments
 
I am having a hard time passing arguments. The function fallingDistance is supposed to acquire a value for the variable time from the function seconds from 1-10...
[4 replies] Last: Thank you as well because I was wondering how to use this code tag. @A... (by Stephanie16)
Inheritance
 
I am new to C++. Recently i so an article here about Inheritance in C++, but i couldn't understand what it is. Can anyone help me please?
[3 replies] Last: Think of it as the aspects of a parents features being passed down gen... (by ragecoder)
CHAR* AND CONST CHAR* INCOMPATABILITY
 
Write your question here. How do you change cstr, which is a char* to a const char* so that atoi can work? char* cstr = "This is C++." int key = 2; ...
[6 replies] Last: abhishekm71 I copied your code and pasted it into Visual Studio 2013... (by phztfte1)
April 2014 Pages: 1... 2223242526... 67
  Archived months: [mar2014] [may2014]

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