Beginners - November 2011 (Page 64)

for or while loop to repeat code to infile another string to repeat the whole code.
 
I got it all down but now i just need to know how to repeat the whole code when i get a new name for example the input text file looks like this 2566 Mick Mos...
[no replies]
I keep getting an error for the "0" when i put 100 or 1000
 
This is the problem I'm trying to read out the numbers everything works but when i put 100 or 1000 i get an text with the first numbers but then the zeros come ...
[4 replies] Last: I got it all down but now i just need to know how to repeat the whole ... (by needhelpalot)
by cogirl
Average and loops
 
Im trying to get the average score to print out from answer of loop. Here is my code as of now. #include<iostream> #include<cmath> #include<stdlib.h> #includ...
[2 replies] Last: Ohh! Thank you so much!!! (by cogirl)
undefined reference to cout,
 
I copied some code from learncpp.com and I get an error. Here is the code from http://www.learncpp.com/cpp-tutorial/111-comprehensive-quiz/ #include <iostr...
[6 replies] Last: Thanks for all your help. I posted in the haiku forums and someone to... (by kidd106)
error C3861 - Issue Building Code
 
I know this is probably a simple error that I am doing wrong but I can't get my code to build. Please any suggestions will be helpful. Thanks #include <l...
[1 reply] : Declare a prototype of your getAttackResults before you call it. (by ciphermagi)
What sorting algorithm is this?
 
#include <iostream> using namespace std; int main() { int num ,ans,x,y,decoy; cout<< "Enter how many numbers to include: "; cin>> ans; cout<< ...
[1 reply] : I believe that is a bubble sort you are doing (by Braindead90)
thanks
 
i want to input integers till push enter,please help me.
[11 replies] Last: Compiled, but freezes. I'm thinking it doesn't know how to stop taki... (by moorecm)
saving string + int to string array.
 
This is my first post here. So in short I'm trying to save a string plus an int to an array. But when doing so I get an error like "no match for "operator...
[no replies]
by xsemel
does anyone know how to....
 
well, i just got into programming, and my professor's a moron. i'm writing a code that is supposed to return a calendar by filling a 2-d array. this is where t...
[18 replies] Last: well, it turns out i was making a comparison instead of setting someth... (by xsemel)
char * pointers
 
hi How can char * pointers be deleted? I've tried this code but it doesn't work. All it does is return the debug assertion error //current level name is a ch...
[7 replies] Last: yh too much stress does reduce reasoning, but no I was just feeding it... (by Blessman11)
Display picture
 
Hey, I'm kind of a noobie to c++ and I just want to know how do I display a picture in a Win32 Console Application?
[5 replies] Last: I want to be able to make a game. You do not want a console wind... (by Disch)
Getline Help
 
I need some help to be able to input a line of text such as..... 1/2 + 4/3 - (3/2 * 1/3) and calculate it. I'm trying to use getline but I either don't un...
[8 replies] Last: int fracInput() { int fracTop, fracBot; char fracSign; //string fra... (by macromicah)
Function issues
 
Im making this code to calculate the total area of a block of cheese subtracting cylinders and spheres (holes in the cheese). Anyway right now my problem is tha...
[5 replies] Last: You're going to find that confirmBubbles has the same problems that co... (by ciphermagi)
fileExists Function doesn't work
 
Hi and Welcome it's my first post :) I'm traing to write a function to check if a file exists, and evertything seams to be good, no errors etc. but the probl...
[2 replies] Last: Thanks, it works :) (by Emperator Vip)
class is locked?
 
Hello, I have a problem using class in Visual C++, when I use the int health; from my class Ogre in main() I get the message Ogre::health is inaccessible :( and...
[3 replies] Last: oh, really? in a lesson I saw someone making a class without using p... (by GaiusBaltar)
Beginner NEEDS help
 
Write a C program that show the following menu items and gets the user input that is one of letters given in brackets. Then, it calls the corresponding user-d...
[19 replies] Last: ty. so much. for everything hmmm // same in matlab % so its for com... (by murat1290)
by DouDou
Accessor function for a member array
 
What is the simplest way to write an accessor function for a member array. class myClass { public: ... getMyArray(); private: int myArray ; }; Thanks
[6 replies] Last: Using (e.g.) getElemCount(), getElem() still allows you to access all ... (by andywestken)
hh:mm in input?
 
how can i write time in this format hh:mm in input? for example 00:42
[9 replies] Last: you can create a time class with hour and min var and overload the '>>... (by jcgertig)
Recursion Concern
 
I was wondering how you would code a function to be able to check the input stream to see if it had data still in it and be able to loop over a section of code....
[2 replies] Last: Recursion is not nessesary: bool done = false; string input; getlin... (by Stewbond)
Function Does not take 4 arguments Error
 
Here's the code and the error I'm having. I'm sure there are more simplified ways of writing this code but right now I just want to fix the error. Also, this co...
[4 replies] Last: I wouldn't spend too much time beating yourself up about it. I spent h... (by ciphermagi)
November 2011 Pages: 1... 62636465
  Archived months: [oct2011] [dec2011]

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