Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5.  
  6. const int MAX_WORDS = 20;
  7.  
  8.  
  9. typedef struct{
  10.     char *word;
  11.     int wordX;
  12.     int wordY;
  13. } objectWordStruct;
  14.  
  15.  
  16. void SetInitialValues(objectWordStruct *activeWords[MAX_WORDS]){
  17.  
  18.     for(int i = 0; i < MAX_WORDS; i++){
  19.         activeWords[i] -> wordX = 0;
  20.         activeWords[i] -> wordY = 0;
  21.     }
  22. }
  23.  
  24. int main()
  25. {
  26.     objectWordStruct activeWords[MAX_WORDS];
  27.  
  28.     SetInitialValues(&activeWords);
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement