Hello
I just started at my new project and decided to using the SFML library (because that seemed the most attractive to me).
It should connect to a FTP-server, but for some reason it ain't working.
This is my C++ code:#include <iostream>
#include <SFML/Network.hpp>
#include <SFML/System.hpp>
#include <SFML/Network/Export.hpp>
#include <SFML/Network/TcpSocket.hpp>
#include <SFML/Network/Ftp.hpp>
using namespace std;
int main() {
sf::Ftp ftp;
ftp.connect("ftp://myWebsite.com", 21, sf::seconds(120));
sf::Ftp::Response answer = ftp.login("myUsername", "myPassword");
if (answer.isOk()) {
cout<<"FTP worked!"<<endl;
cout<<"Answer received: " << answer.getMessage() << " & " << answer.getStatus() <<endl;
} else if (!answer.isOk()) {
cout<<"Answer not received: " << answer.getMessage() << " & " << answer.getStatus() <<endl;
} else {
cout<<"Unknown error occured!"<<endl;
}
}
I'm sure the name of the server, username, and password is right.
This is my G++ input: g++ -o app app.cpp -lsfml-network -lsfml-system
Output of program:Answer not received: & 1002
Someone able to help?
Found the answer: http://en.sfml-dev.org/forums/index.php?topic=17019.msg122359#msg122359Thanks for reading,
Niely