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

Author Topic: Thread, function arguments  (Read 2808 times)

0 Members and 1 Guest are viewing this topic.

Baschey

  • Newbie
  • *
  • Posts: 2
    • View Profile
Thread, function arguments
« on: May 13, 2015, 03:30:46 pm »
Hi there !  :)
I have a problem with create Thread.

My function - void Func(ObjectSAi obj[],float time,ObjectS &object)


Thread TH(&Func,Mass,time,Player)//is not work(to many arguments of function, or wrong argument of function).

Pls help me  :) . How to pass arguments to functions ?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Thread, function arguments
« Reply #1 on: May 13, 2015, 04:00:04 pm »
How to pass arguments to functions ?
I think you should spend some time learning the programming language before using SFML ;)

And there's also a documentation that says how the functions (in that case the sf::Thread constructor) are invoked.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Baschey

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Thread, function arguments
« Reply #2 on: May 13, 2015, 05:45:26 pm »
Hmm strange, all right, i will use std :: thread.

 

anything