Beginners - November 2012 (Page 69)

Best way to read files
 
I'm looking to make a text/2d RPG and I'm wondering what would be the best way to read/write text files for maps/characters/etc. Would it be better to use a...
[no replies]
Help for 1D Array
 
I have an assignment where I was provided some code and I have to write a couple functions. I'll write the assignment and then the code I have so far. Def...
[7 replies] Last: Dear Standard Deviation calculated as squar root((x-(avg))*(x-(av... (by Awais Tahir)
Menu key, change from int to char
 
So wasn't quite sure how to word the problem for the Title but my problem should be quite simple for someone with decent knowledge of C++. Basically I am creat...
[no replies]
Copy x characters from a file to a c++ string?
 
I want to copy 15 characters at a time from a file into a c++ string until the eof is reached (if the last read is less than 15 then I want those too). None of ...
[1 reply] : You can use fread to read exactly 15 bytes. http://www.cplusplus.com/r... (by Moschops)
by Hotice
How to make getline() work when you just called get()
 
I just learned how to get only a character for input! (I did it back in 2011, but I think I have a better way. I just called cin.get(char). The only problem is,...
[3 replies] Last: Thanks brandonator! Because it is a simple yes or no question I was as... (by Hotice)
average program error
 
I am working on a project using 2D arrays to display a class's individual grades, averages, and a class average. I get the following error but I don't see anyth...
[1 reply] : The error message is clear enough. Where was devi declared? (by vlad from moscow)
segmentation fault/ basic array, menu driven program
 
I'm pretty new to c++, and am trying to make a menu driven program. When i run the fourth option, it gives me a segmentation fault. Also, a few of the other fun...
[9 replies] Last: Ah ha, In this case, you are entering an infinite loop in Ascending... (by Stewbond)
Where to store the variables in this problem?
 
Hi guys, I have a task where I have to ask a user to enter a number between 1-10 and I have to ask if he wants to enter another number (Y for yes, N for no) , ...
[4 replies] Last: @ Amishuchak, I must admit these two forum members are pros and know ... (by Kart)
by skarla
SDL help
 
I am trying to make a game that you have a player and when you hit with your ball the boxed,the boxes to be dissapeared or deleted from the screen. So here i...
[1 reply] : Create some kind of variable to indicate whether or not the ball shoul... (by Disch)
[b] A little <fstream> mishap [/b]
 
Hi guys, hows your morning? I hopes its good! Im a little confused on file input and output. I have a textbook which shows a simple output to a file. I modifie...
[1 reply] : I think it should be ofstream instead of ifstream. You can name file_... (by fg109)
Help with Craps game please
 
Hi there, I have written this craps game in C for my assignment and am just trying to put the finishing touches on it, but the problem is I can't get it to play...
[3 replies] Last: The problem is that you have the "junk" variable to get rid of the "\n... (by fg109)
Boolean
 
All declarations are given on my assignment but i dont understand what do i need to do with bool correct; Here is what i have so far in my code #include<io...
[4 replies] Last: Two ways. 1) extract the age as a string, check that the string is a ... (by Lowest0ne)
Read data from file into structure in C++ ?
 
I have the code below to read data from file into structure using C. However, I would like to convert it to C++. Plz, help me. I'm from VietNam, so I speak Engl...
[2 replies] Last: change File to an fstream (and all of the stream's methods), and it's... (by Lowest0ne)
No source file named /home/david/etc... error
 
I just finished making the compiler happy on a console project and went to run the program, but there's no output and the program exits. The error I get in the...
[2 replies] Last: Thank you so much. Initializing the double pointers made the weird er... (by davetep)
Psychic missile, seeking object
 
Hey everyone, I'm trying to make a missile of sorts to detect where an object is going and then itself move to that position. You know like some pixels in front...
[5 replies] Last: Thanks guys. Not sure i can get it to work, but at least i know where ... (by Yihawesome)
Finding the N-th(next) Prime number
 
How to make the program run properly?? #include<cstdlib> #include<iostream> #include<cmath> #include<cctype> using namespace std; int a,num; int isprim...
[3 replies] Last: I thought the OP ment to look for the next prime number that he entere... (by nixer526)
Vote or Not
 
Q.Enter the name,nationality and age of a Person.If the age is greater than 18 and Nationality is Indian,then you can Vote otherwise you cannot vote.Write a Pro...
[2 replies] Last: Looked pretty good for the most part- just don't forget the difference... (by barrelroll)
warning C4553: '=='
 
MyLife Me; index == myList.searchList(Me); confused on whats wrong ? :/
[15 replies] Last: and what type of it? is it an int ? (by chipp)
return array function in C#
 
Can you guys tell me what I'm making mistake I want to display output as Enter the number : 4 Factorial of 4 is : 1 x 2 x 3 x 4 = 24! using System; usin...
[no replies]
Program does not take in the value the user input
 
The program is not taking in the value the user input for 1 of the attribute. #ifndef SQUARE_H #define SQUARE_H using namespace std; class square : v...
[4 replies] Last: Okay! I get it now. Thanks nixer526 for the explaination :) (by hydra89)
November 2012 Pages: 1... 6768697071... 75
  Archived months: [oct2012] [dec2012]

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