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

Author Topic: CFML and MVS  (Read 1033 times)

0 Members and 2 Guests are viewing this topic.

luc

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
CFML and MVS
« 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};
 
}
}
« Last Edit: March 14, 2025, 07:15:59 am by luc »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11173
    • View Profile
    • development blog
    • Email
Re: CFML and MVS
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq/
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

luc

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Re: CFML and MVS
« Reply #2 on: March 14, 2025, 10:07:39 am »
oh yes!!!! thank you, I'm tired  :P ;)

 

anything