- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 9
- Posts with Downvotes
- 3
- Downvoting Members
- 7
I'm using fstream to read words from a file and I can't just read the whole word like so: ifstream ob("file.txt"); string word; ob >> word; But I need to somehow specify to read 20 positions, even though there might be just spaces included. So I was trying to do … |
|
I'm using the Guichan lib and I was trying to run the "First application with Guichan, OpenGL and SDL" example, which is located here [Click Here](http://guichan.sourceforge.net/oldsite/getting-started.shtml) . Everything was fine exept when I exit the program and delete all the pointers which were allocated with the "new" and because of … |
|
I need to use forms, widgets etc. in my program which already takes care of creating a window and such. So the question is, would it be okay to use Windows lib to add the needed features, such as a form with a few widgets without any errors, memory leaks … |
|
To be specific I'm trying to implement this into a small game. What I'm thinking of is having a base/default class for derived objects such as player, enemies, tiles and so on and later the derived classes would inherit this base class and add whatever is needed depending on the … |
|
So I was trying out SDL_gfx lib and tryed using the rotozoomSurface() [Click Here](http://www.ferzkopp.net/Software/SDL_gfx-2.0/Docs/html/_s_d_l__rotozoom_8h.html#a3cb0c11d5edc929579c807dc7612348c) which should've rotated my surface at runtime, but it seems that whenever I do that my surface turns invisible. It doesn't matter if I predefine the rotation or use it at runtime, the same happens, I've … |
|
Maybe I'm just missing something but I was thinking what do you call something like a Windows Form Application in Visual Studio where you can drag and drop and stuff like that. Do you call that an API or SDK or GUI or something else? By the way, as I … |
|
I had this talk with a friend a while back and now i remmember that he said that C# is like a newer version of C++, but i think thats not correct, since C, C++, C# is kinda all oriented in this or that, what do you guys think of … |
|
I have no working experience but i do have some knowledge in programming and web development. Note that i cant work at a company or such right now so i think freelancing is the best choise for me. I think it's much better to list what kind of projects and … |
|
I was just wondering why do we exactly call glTranste command if its possible just to increase objects x, y or z. And its even stated in this tutorial: http://nehe.gamedev.net/tutorial/particle_engine_using_triangle_strips/21001/ that its even faster to only use Vertex3f() instead of resetting the Modelview Matrix. Anyways, maybe its just something particular … |
|
Just wanted to know if we need to texture map the texture on the model with code or is it better to just import a model with textures already on him? (considering its even possible) |
|
So i was simply following one of the opengl tutorials - http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/ So everything works completely fine except one thing, when i load in textures with SOIL lib its not completely correct, but with GLAUX lib it works just fine but i dont prefer using GLAUX. Here is what i … |
|
It seems that i dont fully comprehend how rotation works. So leys say i have a cube and i do this: x = 90.0f; rotatef(x, 1.0f, 0.0f, 0.0f); Notice that my code here may be not all correct, its like that just to symbolize what i mean. So by doing … |
|
Straight to the point, I am using SOIL (http://www.lonesock.net/soil.html) library to upload images into OpenGl. Loading textures works fine but there is this thing i dont fully comprehend. Lets say I load an image into OpenGL via SOIL and I want to reuse the same image over few other textures … |
|
So the function: [CODE]glLoadIdentity();[/CODE] resets the matrix, so for instance we do this: [CODE]glMatrixMode(GL_PROJECTION); glLoadIdentity();[/CODE] how exactly does this work, it seems that we set the matrix and then just return it to the way it used to be. |
|
Example code: [CODE]HWND CreateButton(const HWND hParent,const HINSTANCE hInst,DWORD dwStyle, const RECT& rc,const int id,const ustring& caption) { dwStyle|=WS_CHILD|WS_VISIBLE; return CreateWindowEx(0, _T("button"), caption.c_str(), dwStyle, rc.left, rc.top, rc.right, rc.bottom, hParent, reinterpret_cast<HMENU>(static_cast<INT_PTR>(id)), hInst, 0); }[/CODE] The part I dont get is: [CODE]dwStyle|=WS_CHILD|WS_VISIBLE;[/CODE] So the question would be why do we use '|' and … |
|
I'm trying to use Box2D lib with SDL lib. NOTE that I only get the errors below after I link in SDL too. I think i link everything accordingly but in the end when I write up some code i get errors like: 1>------ Build started: Project: box2d test2, Configuration: … |
|
[B]On visual studio 10:[/B] I've tryed out some code and everything was fine, but when I use this line: [CODE]sf::RenderWindow App( sf::VideoMode ( 800, 600, 32 ), "Hexagon Puzzle Thing" );[/CODE] Or anything with RenderWindow I get an: Unhandled exception at 0x76adfeb8 in SFML + Box2D Project.exe: 0xC0000005: Access violation … |
|
Hi, just wanted to share what I've been doing and ask for some friendly/unfriendly advice :) . Some time ago I've started out with C++, learned the basics and stuff. Then I took up SDL, learned the basics and stuff too, made a few bigger/smaller projects and just recently I've … |
|
I'm using SDL to make a game and I'm using frame independent movement, everything works fine with no gravity or acceleration: [CODE]boxOffsetY += yVel * ( DELTA.get_ticks() / 1000.f );[/CODE] The box moves accordingly, no matter what frame rate i use. But when i try to add gravity: [CODE]yVel += … |
|
Hi, I would like to get an advice, lets take SDL lib as an example. Recently I've been declaring sprite sheets that certain classes use ( player, enemy... ) globally and thought that a better way would be to load sprite sheets inside a class thats using it but if … |
|
Theres this thing that i dont fully understand. Im using this tutorial: [url]http://lazyfoo.net/SDL_tutorials/lesson08/index.php[/url] and i in here we first set up some surfaces with text and then asign their value to the message and then for some reason we have to reset the message value to 0 in order for … |
|
Re:
How do I define a function that reads a sequence of values from an input stream that is passed as an argument? |
|
Re:
Hey All! Can Any one help me in getting an idea what to make for a computer programming project? Thanks! |
|
Re:
Hey, im new to C++ forums and C++ for that matter. Im 16 years old and want to be a game developer so i made a calculator it took about 30min(a while i know but im a beginner) can someone tell me if what ive done is good code or … |
|
Re:
I have an assignment to take the functions and use array subscripting and pointer arithmetic to write the functions. int stringLength(const char* s); char* stringCopy(char* s1, const char* s2); char* stringConcatenate(char* s1, const char* s2); and use the following tester driver: but I have no idea where to start when … |
|
Trying to do some basic "Game of life", but for some reason i'm getting some weird results, the code: [CODE]#include "stdafx.h" #include "stdlib.h" #include <iostream> using namespace std; #include "windows.h" const int V=30;//Vertical const int H=40;//Horizontal char A[V][H]; int ne=0; //Set all to dead void setDead() { for (int i=0;i<V;++i) … |
|
Re:
Hello guys i need your help to finish my project in computer programming so guys i need your help problem: the new telephone company has the following rate structure for long-distance calls: a. The regular rate for a call is $0.40 per minute b. any call started after 6:00 PM(1800 … |
|
Re:
Name: Patrice Nickname: Clousot (you know Inspector Clousot ?) Height: 1m67 Weight: 63kg (62 after typing this introduction) Hair: Brown Eyes: Brown/Green (but both ;) ...) Location: Paris (Not the one in Texas) Age: 42 (and all my teeth until my boss see me typing this mail instead of working) … |
|
Re:
Im new in C++. Please help me for using C++ from basic. What should i do ? |
|
Re:
what is the source code having an output of 1 21 321 using for loop statement in microsoft visual c++? it must be right aligned |