Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1659 connectés 

  FORUM HardWare.fr
  Programmation
  C

  Problème avec les pointeurs (thread)

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Problème avec les pointeurs (thread)

n°1754466
scawf
Posté le 02-07-2008 à 11:14:24  profilanswer
 

Hello  :hello:  
Ca fait longtemps que je n'ai plus toucher à du C/C++.. alors les pointeurs.. bah j'ai oublié  :sweat:  
Bref j'ai ce code:
 

Code :
  1. void* foo(void* data)
  2. {
  3. >>>        return (void**)1;
  4. }
  5. main()
  6. ...
  7.         pthread_t thread;
  8.         pthread_create(&thread, NULL, foo, NULL);
  9.         ...
  10. >>>        int i;
  11. >>>        pthread_join(thread,(void**) i);
  12. ...


(probleme au niveau des lignes >>> )
 
la valeur de retour (void**) me sort par le *** ^^'
Comment on récupère ça ?  :jap:

mood
Publicité
Posté le 02-07-2008 à 11:14:24  profilanswer
 

n°1754557
theshockwa​ve
I work at a firm named Koslow
Posté le 02-07-2008 à 13:51:40  profilanswer
 

return (void *)1;
pthread_join(thread, &i);

n°1754575
Taz
bisounours-codeur
Posté le 02-07-2008 à 14:42:05  profilanswer
 

non pas bon.
void* ret;
pthread_join(tid, &ret);

n°1754625
scawf
Posté le 02-07-2008 à 16:27:16  profilanswer
 

Merci à vous deux ;)
ça marche ! ^^


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C

  Problème avec les pointeurs (thread)

 

Sujets relatifs
Problème de mise en cache d'actionsProblème Socket Bluetooth
problème SDCC et CONTEXTProbleme URL Re-writing
Probleme de ressources (rc) sous VC++ (icones++)probleme redimensionnement image dans un tableau
Problème avec Servlet[résolu]Problème Carateres japonais UTF8 et IE7 php
Problème redirection 301 htaccess[ORACLE] Problème de création de clé étrangère
Plus de sujets relatifs à : Problème avec les pointeurs (thread)


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR