SFML community forums

Bindings - other languages => C => Topic started by: luc on March 13, 2025, 09:12:28 pm

Title: CFML and MVS
Post by: luc on March 13, 2025, 09:12:28 pm
hello,

I don't see what "bothers" Microsoft Visual Studio...or maybe I'm very tired. ;)
Thank you

Quote
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <SFML/Vector2.h>
#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>

int main()
{

    sfVector2f  pt1 ;

   
    struct txtedit {
        int poscx, poscy;
        int tailfont;   
        int nbrcarac; 
        int coultxt;
        sfVector2f  pt;
    };

    struct txtedit te;
   
     pt1 ={200.0,400.0};
     te.pt ={100.0,300.0};
 
}
}
Title: Re: CFML and MVS
Post by: eXpl0it3r on March 13, 2025, 10:08:57 pm
It's not valid C code.

You either need to initialize the structs when declaring them or otherwise assign the values individually.
Title: Re: CFML and MVS
Post by: luc on March 14, 2025, 10:07:39 am
oh yes!!!! thank you, I'm tired  :P ;)