Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - newbieg

Pages: [1]
1
Window / Noob question about variables in Text()
« on: May 14, 2012, 09:47:50 am »
Hi everyone,
I just got SFML installed so I was playing around with the code that the tutorial provided, I was just wondering why this code only outputs variable a and not variables a+b;
#include "SFML/Graphics.hpp"
#include <string>
#include <iostream>
using namespace std;
int main()
{
        string a = "hello", b="again";

    sf::RenderWindow window(sf::VideoMode(600, 200), "SFML works!");
    sf::Text text(a + b);

    while (window.isOpen())
    {
               
                sf::Text text(a);
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        window.clear();
        window.draw(text);
        window.display();
    }

    return 0;
}
I was just trying to see if I could add strings together within text(), which I would need to do if I tried to make a game. Is it possible to do calculations inside of a function from SFML, or do I have to do the calculations first and only output the one variable that contains the result?

2
General / Help with Installing SFML 2.0
« on: May 11, 2012, 10:37:58 am »
So I have most of the install done for SFML 2.0 in Visual Basic C++, there's just one line in the tutorial that I don't understand;
Quote
Now compile the project, and if you linked to the dynamic version of SFML, don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>) to the directory where your compiled executable is. Then run it

So I did link to the dynamic instead of the static Libraries, so where do I copy and paste the DLL's? Do I put them with my main files, or in the debugger file?
 I'm nowhere near turning this program into a  .exe executable yet, so do I put the DLL's in a different spot if I'm building and debugging?

3
SFML website / SFML 2.0 Error message
« on: May 10, 2012, 09:12:10 am »
Hi, I'm having trouble downloading SFML 2.0 for visual basic C++ 2010

The error message pops up right as the download completes:

Quote
C:\Users\Computer2\Downloads\SFML-2.0-rc-windows-32-vc2010.zip.part could not be saved, because the source file could not be read.

Try again later, or contact the server administrator.


Does anyone else experience this problem, or just my computer? I'm running with Windows 7 OS.

Pages: [1]
anything