Beginners - March 2013 (Page 8)

I get a Access violation reading location error every time I close my program.
 
Tower.h #ifndef TOWER_H #define TOWER_H #include <SFML\Graphics.hpp> #include <SFML\Graphics.hpp> #include <vector> class Tower { public: sf::...
[5 replies] Last: Hmm. I thought making the texture static would only make one instance... (by Disch)
Fatal error in a 2D array
 
Hello everyone! I'm pretty new with c++ in general (first college class) and I just joined the forum today. I am having a problem with looping the total result...
[4 replies] Last: Sweet! I added those in to my program. Now it looks pretty solid! Than... (by Shane Anderson)
confusion with the void function
 
Hey. It's me again, the worlds worst programmer. Anyways, I never was able to complete the diamond shape because I still don't understand how it works, so uh ...
[1 reply] : There are supposed to be two separate functions here, but somehow one ... (by Chervil)
Ignoring a specific keypress while (event) happens
 
So right now I'm putting the final touches on my (laughably primitive)first 2D Conio C++ game, where the player has to hit a running enemy with a bomb launched ...
[2 replies] Last: *Headdesks* Thank you, much appreciated. Seems all the real problems I... (by Specula)
Battleship project
 
The Project will be a simplified version of the classic game of Battleship. You will have two six by six grids on which you will place two adjacent 0’s. The c...
[no replies]
Passing Array to function
 
beginner stuff but i dont know why its not working correctly. This is only passing my array as 4 items instead of 9. #include <iostream> using namespa...
[3 replies] Last: Be careful! Output(MyArray, sizeof(MyArray)); This only works well b... (by tcs)
by Moooce
enums and operator overloading
 
Just trying to make cyclical enum with an operator++ and really feeling like I'm fumbling around. Any advice appreciated {B¬) enum RENDER_MODE { RENDER...
[no replies]
by aMo38
Ifstream array help
 
I'm trying to make a 3 by 3 array from information in a .txt file. Inside the .txt file is 0 0 1 0 1 0 1 0 0 I just dont know how to set my integer num as a pro...
[1 reply] : Your << is going the wrong way. It should be infile >> num; (just lik... (by freddy92)
Lexicographical order
 
How can I write a function that takes three string values as parameters and displays them in lexicographical order by including iostream and string only?
[no replies]
rock paper scissors game. plz check my program!!
 
I have to make a rock paper scissors game, have to use value returning function and not allowed to use void method. please check my program, why it's not workin...
[2 replies] Last: Your int winner(int, int); function is supposed to return an integer... (by Yanson)
Help me understand this recursion please
 
I have the following code: #include <iostream> using namespace std; int count_digits(int n) { if (n >= 0 && n < 10) { return 1; ...
[4 replies] Last: You're very welcome (by Stewbond)
A failed attempt to create "PC guesses a number" game..
 
Can you please tell me what is wrong in this code? I basically want PC to guess my number with me only telling LOWER or HIGHER. But it's not working as it shoul...
[17 replies] Last: A way to make the computer never repeat the same thing twice is to fir... (by Vidminas)
IFSTREAM, very basic.
 
Hi. I am having trouble writing a very basic program. I am using ifstream to read information from a txt file but it is only reading the last line over and over...
[4 replies] Last: Thank you! I've figured it out thanks to your help. But I think I was ... (by kyiro37)
Prime Numbers Program
 
How do I add the bool function isPrime to this and also an output that says "Invalid Input" to a number less than 2? I already tried adding the "Invalid Input" ...
[14 replies] Last: See This Code Maybe Help u #include <iostream> using namespace std;... (by Abdo2)
Reading a data file with a Header Value
 
Hello! I am working on reading a data file using a class called 'Student'. But I am having a hard time printing(reading) it(I'm also getting compiling errors...
[2 replies] Last: Line 29, 32, 35, 38 read in some variable. Line 30, 33, 36, 39 overwri... (by tcs)
2 Classes and interface Class HELP PLEASE.
 
WITH THIS PROGRAM I HAD TO ADD A BENEFITS CLASS AND AN EMPLOYEE INTERFACE. BUT IT WONT ACCEPT ANYTHING FROM THE BENEFIT ADDED TO THE EMPLOYEE CLASS. WHAT AM I M...
[no replies]
Error in calculation
 
I created two while blocks, but only one of them works although I think they both should. I think I may have made syntax errors. I'm not really sure. Any help i...
[2 replies] Last: MiiNiPaa made a good point in his last statement. Implementing the if... (by regnar86)
Unable to compile and run this C program
 
I'm trying to compile run the below C code on my Windows & Ubuntu machines with both GCC & VC9. However, I'm facing below issues: On Windows machine: VC9 Co...
[9 replies] Last: No, you cannot. It is C++ library. You have to use something like int... (by MiiNiPaa)
by Markc
win32 api c++ listview
 
Hi all! I am new in this. I use mingw c++ compiler. I have a problem with ListView I created a listview hListView = CreateWindow(WC_LISTVIEW, NULL, ...
[no replies]
by skpdh
exe created by C++ and what it means by saying it is in assembly code
 
Hello, I am having a problem in understanding the trouble with running the exe frile created using GCC. When I started learning C++, I read lower level l...
[2 replies] Last: When a program is built with debugging symbols, the executable usually... (by closed account zb0S216C)
March 2013 Pages: 1... 678910... 87
  Archived months: [feb2013] [apr2013]

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