Beginners - March 2014 (Page 16)

How to reverse the values stored in an array?
 
Okay so I have read in the values and stored them in an array. I can't figure out how to reverse those values stored in the array without declaring another arr...
[9 replies] Last: or If you can use a 2nd array, read the first in reverse. (by SamuelAdams)
by Gasper
while, return 0; ?
 
What does the while loop actually do and what does that (true) at the start mean. I would also like to know why are there 2 "return 0;" instead of one at the en...
[5 replies] Last: Ok, thank your for your help! (by Gasper)
Window Menubar functions
 
Hello all. This is a problem which I CANNOT find the answer to. Please help me out!! So I basically want to be able to open up a '.exe' if I click the menu ...
[no replies]
Input problem
 
The inputs are numbers in just a input line. The number of numbers in the line increasing by 1 every line of input. So how can I assign them to an array or some...
[2 replies] Last: Nevermind, I've got it. Sorry. (by dleanjeanz)
Enumerations
 
I am getting along pretty well with c++ but there's one thing that just has kind of stumped me, enumerations. I kind of get the concept but I guess I don't unde...
[3 replies] Last: Thank you, that makes a bit more sense, i'll just need to try and work... (by TrevorHart)
Linked list editing using remove and insert
 
I need to take the first linked list, and use the insert and remove functions to turn it into the second list that is commented. I cannot for the life of me fig...
[1 reply] : Whose idea is this remove()? // List has A->B->C->D->E remove( D, B )... (by keskiverto)
Complete scrub: Issues with Class field with Pointer
 
I am doing a project for school and no I am not trying to cheat. I am genuinely trying to learn programming and have been sitting here going insane for over 8 h...
[12 replies] Last: What errors? There is nothing syntactically wrong in that block, exce... (by keskiverto)
average of an array is not working
 
What's wrong with this code? float cal , total; int i,prom; for(i=0;i<5;i++){ cout << "cal " << i << " "; cin >> cal ;...
[3 replies] Last: well.. i solved... it was just: double calif , total=0, aver=0; im... (by dualdark)
Infinite Loop
 
Hi, I am trying to write a program but I am getting an infinite loop and have no idea why, we just studied loops today so i'm new at this. can anyone find out w...
[6 replies] Last: I think the last do-while loop is causing your problems. It you answer... (by MagicalForestElf)
Subtraction with #define
 
Problem: http://www.codechef.com/problems/TLG I have written a solution to solve the problem in the link above. I have #define-d as in the codes below to get th...
[9 replies] Last: Yesterday, I realized that I had read the problem without regard. The ... (by dleanjeanz)
intro to programming course
 
i am currently a junior in high school, and this summer i will be taking an american sign language class at my local community college. while looking through th...
[3 replies] Last: COMSC-110 Introduction to Programming 4 units SC • 54 hours lecture... (by Antone333)
Game Engine
 
So I'm using Allegro 5 to write a game. I wanted to know what exactly what goes into the Engine itself and how all the different components interact. The way I ...
[11 replies] Last: If you want to learn the ins and outs of a game engine, I'd say wait t... (by TrevorHart)
Map and word count help.
 
I am writing a program to search through a .txt file and count how many times each word occurs in the file. My code works however It's not to my liking. It coun...
[2 replies] Last: > It counts words but will create separate counts for eg.) Your, Your'... (by JLBorges)
Construct Greedy Random Solution
 
The function has to generate a solution for a candidate using greedy random solution? I figure to use void as it not returning anything but to find a random s...
[1 reply] : Do you mean this? https://en.wikipedia.org/wiki/Greedy_randomized_adap... (by LB)
Getting numbers from a data file
 
I do not have a code that I need help with. I would like to ask how do I get a line of numbers from a data file with multiple rows of six number lines. for exa...
[1 reply] : Don't use .open() and .close(), use curly braces instead: //...code...... (by LB)
Loops
 
This is code that is going into a function that when put into the program will add Roman Numerals cin >> RomanNum1; while (!cin.eof()) { ...
[12 replies] Last: Now any non-roman-numeral character will break the loop. If that's wha... (by LB)
by fc3s
Help with GPA calculator problem
 
Hi, I keep getting a red squiggly line under my "<<" symbols and I don't know why!! #include<ctime> #include<iostream> #include<string> using namespace ...
[3 replies] Last: first you must put the comparison and then the bracket for instruction... (by dariusd7)
Error: Expected primary-expression before...
 
Error: Expected Primary-expression before kid. I don't know what's done wrong //Function prototype void readStudentData(Student &); int main() { ...
[1 reply] : line 14 remove the second student (by Little Bobby Tables)
by genson
PI Code
 
I need help with an assignment, I don't know how to go about this in order to calculate my data. I have to calculate 3 different formulas in order to find the ...
[6 replies] Last: Can I see the code you used? (by giblit)
String variable?
 
I was writing a very, very piece of simple code. #include <iostream> using namespace std; int main() { repeat: cout << "Enter two integers: " ...
[6 replies] Last: Goto is bad, because it makes code look like spaghetti. How spaghet... (by heyyouyesyouiloveyou)
March 2014 Pages: 1... 1415161718... 79
  Archived months: [feb2014] [apr2014]

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