Q:

VBO not working

I just get a black screen when I try to use a vbo. I'm using GLFW with GLEW. It does the same with textures but I didn't use textures to see if that'd work, but for some reason it's not. I had it working but I made some changes to the code, so I think I may have done something. PS: If the code has an error in it, let me know, as I removed code that doesn't affect rendering and I may have deleted important code on accident
Here is main.cpp, with some stuff that doesn't affect OpenGL removed:
//Include all OpenGL stuff, such as gl.h, glew.h, and glfw3.h
#include "gl.h"

//Include a header which adds some functions for loading shaders easier, there is nothing wrong with this code though
#include "shader.h"

float data[3][3] = {
{0.0, 1.0, 0.0},
{-1.0, -1.0, 0.0},
{1.0, -1.0, 0.0}
};

int main()
{

   if (!glfwInit())
    return 1;

    GLFWwindow* window;

    window = glfwCreateWindow(800, 600, "VBO Test", NULL, NULL);
    if (!window)
    {
       glfwTerminate();
       return 1;
    }

    glfwMakeContextCurrent(window);

    if (GLEW_OK != glewInit())
    {
        return 1;
        glfwTerminate();
    }

    //There are normal error handling stuff I do to ensure everything is loaded properly, so the shaders not loading isn't a concern as it'll clearly tell me :)
    GLuint vertexShader = loadShader("shader.vert", GL_VERTEX_SHADER);
    GLuint fragmentShader = loadShader("shader.frag", GL_VERTEX_SHADER);
    GLuint program = createProgram(vertexShader, fragmentShader);

    //Also, the shader files should make everything I draw yellow, and they are not defective

    GLuint vbo;
    glGenBuffers(1, &vbo);

    glBindBuffer(GL_ARRAY_BUFFER, vbo);
    glBufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW);
    glVertexPointer(3, GL_FLOAT, 0, 0);

    glBindBuffer(GL_ARRAY_BUFFER, vbo);
    glBufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW);
    glColorPointer(3, GL_FLOAT, 0, 0);

    while (!glfwWindowShouldClose(window))
    {
        glClear(GL_COLOR_BUFFER_BIT);

        glUsePorgram(program);
        glBindBuffer(GL_ARRAY_BUFFER, vbo);
        glDrawArrays(GL_TRIANGLES, 0, 3);

        glfwSwapBuffers(window);
        glfwPollEvents();
    }

    glfwTerminate();

    return 0;
}

shader.vert
void main(void)
{
   gl_Position = gl_Vertex;
}      

shader.frag
void main()
{
    //Set fragment
    gl_FragColor = vec4( 1.0, 1.0, 0.0, 1.0 );
} 

A:

The main thing that jumps to mind is not enabling the client states for vertex and colour pointers.
Since the colour and position data overlaps, the colours will look a little strange. I'd start with just the glVertexPointer and glEnableClientState(GL_VERTEX_ARRAY), using a single glColor3f call. Then add a colour array later.
Also, you're buffering the same data to the same VBO twice. The VBO only needs to be bound before one call to glBufferData and the gl*Pointer functions.
Personally I don't like the 2D array, even though it probably works when declared statically. OpenGL will take data out of memory linearly. Using an array of structs can be quite nice.
See this for an small example:
http://goanna.cs.rmit.edu.au/~pknowles/SimpleVBO.c

