elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Temas
Páginas: [1]
1  Programación / Programación C/C++ / Problema con Punteros en C en: 31 Marzo 2012, 18:13 pm
Hola a tod@s, me gustaría que me ayudasen con un problema que tengo al hacer un programa usando punteros en C. El programa es el siguiente:

Código
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. struct point
  4. {
  5.  float x,y;
  6.            };
  7.  /* Function */
  8.  
  9.  void function(struct point *Tk, struct point Tz, float fi)
  10.  {
  11.  Tk-> x=Tz.x*cos(fi)-Tz.y*sin(fi);
  12.  Tk-> x=Tz.x*sin(fi)-Tz.y*cos(fi);
  13.       }
  14.  /* Call */
  15.  
  16.  function(&Tk,Tz,fi);
  17.  
  18.  system("PAUSE");
  19. }

Este programa me da error en la línea de: [ function(&Tk,Tz,fi);];
me pone:

- Conflicting types for 'function'
- Syntax error before '&' token

Si me podeis ayudar, os lo agradecería muchísimo.

Gracias de antemano.
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines