Beginners - April 2014 (Page 36)

Disagreement between functions,C++
 
Hi, everyone. I'm trying to write the code for a hangman game(I already looked though several threads trying to solve my problem). Basically, the program is s...
[12 replies] Last: I've got it working now. Thank you very much! (by ChocolateGrapes)
by mv81
Making a calculator program.
 
So i was wondering if their is a way that you can make your program read a file and read all the numbers in the file and plug it in your formula. And output the...
[1 reply] : http://www.cplusplus.com/doc/tutorial/files/ You will want a simple i... (by LB)
Bubble sort using templates
 
Write a template version of Bubble sort algorithm. The function should look like: template <class T> void BubbleSort(T A , int N) where A -- array to sort, N...
[4 replies] Last: ok thanks (by Stephanie16)
Make Interest Table using Loop
 
I need to make a table using a loop. I need to display The month and the old balance, monthly payment, interest paid, principal paid, and new balance for each ...
[no replies]
Operator Overloading, Using this
 
Hi! I'm trying to add two "queues" together to make a queue that is a combination of the first and second queues. For instance, if queue1 = 1 2 3 and queue2 = 4...
[9 replies] Last: OH! Alrighty, I was trying to do the latter. That makes a lot more sen... (by ECEsasha)
grading a quiz program
 
I have a homework assignment that I need to get done and here is the problem This exercise is designed to introduce you to arrays and strings (i.e., arrays of ...
[15 replies] Last: ok i got that fixed and now i have #include <iostream> #include <fst... (by owenkmc)
FFzzztt...
 
So, I've got a 'nice' block of code that I made a few cycles ago, and want to get started on it again. I say 'nice' as in it was quite an achievement when I mad...
[2 replies] Last: huh? I had been playing too much "Ancient Domains of Mystery" and deci... (by Perry Turner)
by Pedreo
Read Function c++ HELPP!!
 
I'm really having trouble finding a code to compile my program but here it goes. All i need is to create a "read" function to read all the data for a Player Ob...
[no replies]
if ladder
 
I am trying to initialize a variable "amount" for the following conditions: For the first 500 trillion grubnicks in sales, the company will be extended 20% ...
[5 replies] Last: Here's a good starter:[code firstline=6]if(sales <= 500) { amount ... (by LB)
fstream - files
 
//Hello guys! Can you help me to improve my code? (not about making it OOP...) //Are there serious problems in my code? #include <fstream> #include <iostream...
[no replies]
by Arcie
Having srand/time issues... help?
 
This is a short piece of code I am writing. It's for a homework assignment but totally nothing to do with the homework assignment. I am trying to add flare to t...
[4 replies] Last: Problem resolved! Chervil, you were totally on track! I was past my RA... (by Arcie)
Erasing a specific element in a vector
 
In this portion of code I am setting an iterator, initializing it to the beginning and then setting it to variable of type int to remove the integer or atleast ...
[2 replies] Last: After I posted this I actually looked at that loop and wondered why I ... (by Tressor54321)
by klay2
@ symbol not erasing when moving
 
the @ symbol won't go away like it should and yes I know it has a lot of windows specific code I couldn't find a good way around that #include <iostream> ...
[no replies]
by ASQ19
cpp(1142) : error C2181: illegal else without matching if
 
I've the following error: cpp(1142) : error C2181: illegal else without matching if Would you please help in this one ? for(i=0;i<npixels;i++) { ...
[3 replies] Last: THANKS (by ASQ19)
by Sam567
How can I store both Numbers and Letters in a Variable
 
Basically I want to be able to ask the user to enter a grid reference which is two letters followed by 6 numbers eg SX 345787 and then put that into an array. I...
[1 reply] : std::string line; std::getline(line, cin); // Gets everything up to ... (by Stewbond)
Array subscript problems
 
Hi! I'm a beginner in C++ , I'm learning about it now in high school and while I was writting down a code an error appeared.It says :"invalid types 'int ' for a...
[2 replies] Last: thank you ! (by astreet)
Finding the length of strings?
 
Is there any way to determine the length of a string without the use of iterating through the string until you find the null terminator. Because in some code I ...
[6 replies] Last: @ LB and Duoas . You're right, of course. It slipped my mind that ... (by AbstractionAnon)
AVL Tree Creation Problem
 
Hello all, I am trying to make my first implementation of a AVL Tree. However when I compile and run the code, it does not output the value of the root. Any ...
[1 reply] : This is a common problem related to most vexing parse. On line 51 (the... (by LB)
by beyorj
How do I search the whole array?
 
Program is a list of names and asks the user to input one and tells them if its in there or not. If I enter the first name(search) and set if (names == sear...
[3 replies] Last: It's best if you put lines 20-32 into a function. bool FindMatch (... (by AbstractionAnon)
How do I set up an array that can hold up to 50 users
 
For a HW I have to write a program that simulates a website login. I am already provided with a file that has 10 users already each with their own userID: a s...
[1 reply] : I would recommend a vector, but if you have to use an array you would ... (by BHX)
April 2014 Pages: 1... 3435363738... 67
  Archived months: [mar2014] [may2014]

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