User Profile

Collapse

Profile Sidebar

Collapse
sfuo
sfuo
Last Activity: Sep 29 '09, 05:09 PM
Joined: Apr 25 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sfuo
    replied to "was not declarded in this scope"
    in C
    So you are saying that for something like my object header I should change it to:

    Code:
    #ifndef OBJECT_H
    #define OBJECT_H
    
    #include <vector>
    #include <string>
    #include <gl/gl.h>
    
    using namespace std;
    
    class OBJECT
    {
    	struct VERTEX
    	{
    		float x, y, z;
    		float u, v;
    	};
    
    	GLuint surface;
    	vector<VERTEX>
    ...
    See more | Go to post

    Leave a comment:


  • sfuo
    replied to "was not declarded in this scope"
    in C
    turns out in my "object.cpp " file I was including "object.h" and I was the source of the problem. I changed this to "lib.h" ( I do not fully understand why this fixed it seeing how in object.h lib.h is included, this probably shows some of the advanced C++ guys how "not smart" I am when it comes to this ).
    See more | Go to post

    Leave a comment:


  • sfuo
    started a topic "was not declarded in this scope"
    in C

    "was not declarded in this scope"

    Hey guys, I went from working with SDL to OpenGL now and have transferred some code from one project to another. I do not understand why I am getting an error with this:

    "lib.h"

    Code:
    #ifndef LIB_H
    #define LIB_H
    
    
    #include <windows.h>
    #include <gl\gl.h>
    #include <vector>
    #include <string>
    #include <fstream>
    ...
    See more | Go to post

  • sfuo
    started a topic Another file copy problem
    in C

    Another file copy problem

    I am trying to make a window pop up that has 2 fields called IDC_NEW_TEXTURE _NAME and IDC_NEW_TEXTURE _BROWSE_FIELD. When I enter a name for the texture and a path name either with the browse pop up or a manual type in then click OK the code should copy a file from the browse field to my set directory with the new texture name with .png as the extension.

    the code for the window callback is:

    Code:
    LRESULT CALLBACK NewTexture(HWND
    ...
    See more | Go to post

  • thanks it works great and I would have never figured it out
    See more | Go to post

    Leave a comment:


  • I have a similar problem with my code. Pretty much what I would like to know is how do I return a structure that was created within a class. Here is what I have:

    Header:

    Code:
    class Tile
    {
    	private:
    	SDL_Rect tile;
    	string type;
    	string texture;
    	int clip_num;
    	int col_num;
    	int ID;
    	struct warp_coords
    	{
    		string name;
    		int x;
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...