Beginners - December 2011 (Page 2)

EXC_BAD_ACCESS
 
Hey, I'm returning to c++ after taking the course in college, and I've run into a mysterious error: whenever I try to "set" a string member variable I get the E...
[2 replies] Last: THAT FIXED IT! I can't believe it was that simple. Well, that's what I... (by hunterbdb)
Same program: two different results
 
Hello, I need your opinion of what is going wrong. From home I wrote a program using Bloodsheed and got the wanted result. The purpose of the programm is t...
[5 replies] Last: Hi I am back. I shared my problem with my teacher via an email before ... (by CuriousGuy)
difference between 1 and 01
 
Is there any difference between the two? For example, can I assign the value "1" instead of "01" to a variable? Or is the user allowed to enter "03" instead of ...
[10 replies] Last: Be careful. What you write in your source code != what the user types ... (by Duthomhas)
TIMER
 
Hello guys Actually my game is like a quiz . i wanted to insert a timer in my game so that when 30 seconds are over the level on which the player is gets ...
[2 replies] Last: By the way, if you want to run the timer in parallel to a cin, then yo... (by Stewbond)
by sky2k
Tic-Tac-Toe
 
I'm currently attempting to make a two player Tic-Tac-Toe Game for 2 players I am currently very happy with the results I am having. Except I cannot get the CH...
[3 replies] Last: I don't know if this counts, but at line 42 and 54, always end else-if... (by Caprico)
Result(*pfunc)(Arg); ???
 
template <class Arg, class Result> class pointer_to_unary_function : public unary_function <Arg,Result> { protected: Result(*pfunc)(Arg); public: e...
[11 replies] Last: No I'm just asking...not messing things up.Thread closed. (by hentaiw)
2D game shooting part
 
Hello everyone. Im trying to create a quite simple 2D game using allegro library. The one thing I need to know, what is the best way of making the shooting par...
[2 replies] Last: Well, You showed me the part where Math comes in, thank You for it. Bu... (by Daniels Pitkevics)
by kapo
simple recursion function
 
/*Write a program that calculates triangle number by using a recursive function. A triangle number is the sum of all whole numbers from 1 to N, in which N is ...
[6 replies] Last: No, because there was no return value for one possible branch, it retu... (by LB)
reading/writing binary files into/from vectors
 
Hi, i'm having some trouble writing/reading data into vectors! This is a simplified example of what I'm trying to do, writing a vector of vector of ints into a ...
[2 replies] Last: Thank you that is a great help! It seems so simple now, I've been tryi... (by Shifty89)
Learning how to program from virtually nothing
 
Over the years (and in more recent months) I find my command of programming is rather limited. I can figure out and program some complicated mathematical stuff...
[2 replies] Last: You can learn alot from just tinkering with code and a compiler but it... (by IceThatJaw)
Linking problems making a singleton
 
Hi all, I'm trying to re-learn c++ after being away for 4 or 5 years. I'm trying to create a singleton class, but when I attempt to link I get an error. He...
[2 replies] Last: Aren't you supposed to return it as a reference or pointer? Returning ... (by IceThatJaw)
Multiple classes as friends by default - why?
 
Hi, I'm writing a Connect4 program that uses a large number of board objects called SuperBoard, and learned while writing the copy constructor that each Supe...
[7 replies] Last: I meant to say another class, not instance. I thought he was trying to... (by IceThatJaw)
help in functions
 
Please help me in this problem. Rewrite the following program using the following functions: 1) double SINX(double x, int m) 2) double Fact(int n) 3) void...
[2 replies] Last: If Fact is a Factorial function you could impress you Prof by using re... (by IceThatJaw)
Please,,error in my program
 
I'm working on C++ visual studio 2008. I've written a program ,and it gives me this error: Error 1 general error c1010070: Failed to load and parse the m...
[10 replies] Last: The manifest settings are in project settings under Configuration Prop... (by SortaCore)
Switching windows and sending keystrokes
 
I've been looking for a while on this and can't find anything that I can understand (some on here). People direct others to websites where it is rather confusi...
[9 replies] Last: Thank you, start worked! But now another problem presents itself. Th... (by dalydir)
by Delca
Segmentation fault with std::list
 
Hi all, I have this class named "room" : class room{ private : int* array; int xlength,ylength; public : room(int* data...
[11 replies] Last: [quote=ne555]¿? it is not modifying 'data' ¿why passing it by refere... (by closed account zb0S216C)
System command to open program freezes program
 
#include <tchar.h> #include <urlmon.h> #include <dos.h> #include <iostream> #include <fstream> #include <string> #include <stdio.h> #include <time.h> ...
[1 reply] : Your program is certainly starting notepad, however to continue to the... (by Stewbond)
question with for statement(three initialization forms)
 
There's a for statement code and below is its output and description. I don't quite understand the description of the two declared cout. What does the author wa...
[2 replies] Last: Basically the first for loop uses a local variable limited inside the ... (by eypros)
Array of structs access violation
 
I'm new to C++, though I've programmed in scripting languages like PHP and Perl. I've got a very simple piece of code, that I actually got from a tutorial, that...
[2 replies] Last: Oh wow, did I overthink that one. You're right. /embarassed. Thanks s... (by somatic)
Game won't play again!
 
Hi, I've recently coded a small text based game. Everything works great except for my game won't play again. I've tried multiple methods but none seem to work a...
[2 replies] Last: Thanks for the help I can't believe i missed that! (by Ryan Quanz)
December 2011 Pages: 1234... 47
  Archived months: [nov2011] [jan2012]

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