Beginners - July 2012 (Page 36)

SDL Segmentation Fault
 
Hello, I keep getting this when I run my program outside codeblocks. I know what the problem means but not sure where it lies. Thanks in advance for you help...
[2 replies] Last: YOU ARE A LIFE SAVER THANKS!!!! I was being wierd and thought it all... (by Bloodtake)
Class in Header file with no implementation
 
I created a class in Visual studio 2010 in a header file. .h file: #pragma once #include <SFML/Graphics.hpp> class Projectile { public: sf::Sprite sp...
[5 replies] Last: When I include the .cpp in the main I get compiler errors: Do not in... (by Plamen Gochev)
Arrays in classes
 
Hey, I am getting some unexpected errors in my code, I am wondering if the following is legal; class information{ public: string hole_cards ; }...
[12 replies] Last: Hey Volatile Pulse, Thanks dude, I am not really sure I fully underst... (by Topdog2904)
Hi! I'm new.
 
Hi guys, I'm fairly new to C++, I know some of the basics from learning to make games, mostly using a drag n drop program but putting as much code into it as...
[1 reply] : There are a few people here that work on games, you might have better ... (by Volatile Pulse)
Can anyone help with pythagorean equation program?
 
Ok I am trying to right this program that calculates the largest side of a triangle, I got that part. The problem comes from the fact that when you continue to ...
[3 replies] Last: You can do what you are describing with dynamic memory. I would also r... (by Computergeek01)
by Chubbs
Displaying the highest value
 
Hello, I'm having a hard time getting my program to show the largest value out of a series of user prompted values. I need to have my program be able to ask th...
[1 reply] : int input, big = 0; while(cin >> input) { if(input > big) big = i... (by gemic)
extended ascii and istream& getline (char* s, ...
 
Hi all, If I want to deal with extended ascii , i.e. from 128 to 255, shall I use char or unsigned char ? If I shall use unsigned char , how to make it c...
[6 replies] Last: Great. Thank you very much Cubbi. This is not directly linked to my or... (by lalebarde)
map::insert causes run-time error
 
Hello everyone, I have been trying to fix this error for a couple of hours now and am close to throwing my computer out the window. I have a function with...
[2 replies] Last: I'm sorry I misspoke. Geometry is actually just a structure with some ... (by Alex Rablau)
Why am I getting all of these errors in the body of main?
 
I'm attempting to write a loan program.All of my errors are coming before the void functions.Can someone tell me what's going on here? #include <fstream> ...
[4 replies] Last: Got it worked out. Thanks for the help, guys. (by C Minus Minus)
mashin hesab
 
...
[4 replies] Last: I doubt it'll help THAT much. Going from Persian (according to google)... (by ResidentBiscuit)
about what() in exceptions
 
Hi, I saw this code in c++ tutorial of this site: // standard exceptions #include <iostream> #include <exception> using namespace std; class myexception: publ...
[1 reply] : A const member function is a function that doesn't change the data i... (by Catfish2)
Does a Function's Const-ness Influence the Return Type?
 
As the title says, does the const-ness of a member functions influence the type it returns? I have this simple class: struct X { X(int *i_ = nullptr...
[2 replies] Last: I should've guessed that much. Thanks for clearing that up for me, At... (by closed account zb0S216C)
calender mal alignment issue
 
#include <iostream> #include <iomanip> #include <cmath> #include <string> #include<conio.h> using namespace std; int daysPerMonth(int month,int year...
[2 replies] Last: only the first week of the calender is not happy. rest is fine (by Pimpsn00ky)
by ACE123
input file name and open file
 
Hi. My program asks the user the create a recipe name, enter ingredients then method. the program writes this information to a text file perfect, BUT I want the...
[2 replies] Last: Might wanna open this file with the ios::app flag, also. (by ResidentBiscuit)
help me understand classes please
 
I understand what a class is but not how to use it. And I don't mean syntax. Firstly, what is the purpose of public and private? Secondly, what is the d...
[9 replies] Last: Do not look for comparisions.Just understand what the deal is.And you ... (by Akshit)
Can anyone help with pythagorean problem?
 
Ok I am trying to right this program that calculates the largest side of a triangle, I got that part. The problem comes from the fact that when you continue to...
[2 replies] Last: Something like: double largest = 0; //... c = sqrt(pow(a, 2.0) + (po... (by moorecm)
sum of leaves in binary tree
 
hi i'm trying to write a c code that calculates the sum of the leaves(only leaves) in a binary tree using recursion but its no worked out to me please help me...
[14 replies] Last: The final function that works looks like : int sumOfLeaves(Tree* roo... (by yyoni69)
Passing array as argument
 
Well, I have been playing around to pass an array as a argument in a function and that function would loop through array and write its content but here is my pr...
[6 replies] Last: @Stewbond 2. Use the sizeof function to get the size. I've heard pe... (by vlad from moscow)
Stack Overflow
 
Can anyone make any suggestions to make this code more efficient so that it doesn't cause a stack overflow? I think it's my humongous array, but I don't think ...
[15 replies] Last: > I don't understand that code. Sieve of Eratosthenes http://en.wikip... (by JLBorges)
Help With If Statement
 
hi guys my first post here, basically im making a point and click game with SDL, and what i want the code to is, when i click on an image(barrel) the image will...
[3 replies] Last: I'm just a newbie as well, but it looks to me like not all of your blo... (by PadreDoom)
July 2012 Pages: 1... 3435363738... 54
  Archived months: [jun2012] [aug2012]

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