0 Members and 2 Guests are viewing this topic.
error: aggregate ‘sf::SoundBuffer buffer’ has incomplete type and cannot be defined
#include <iostream>#include <stdio.h>#include <SFML/Graphics.hpp>#include <SFML/Graphics/Text.hpp>#include <SFML/Audio/Sound.hpp>using namespace std;using namespace sf;int main(){ char w; // SoundBuffer buffer; buffer.LoadFromFile("Shot3.wav"); Sound sound(buffer); cout << "Hello world!" << endl; sound.Play(); do { w = getchar(); } while (w!= 'e'); sound.Stop(); return 0;}