Home > Back-end >  Surprised! C language defined in the header file may not be able to use? Everybody help look
Surprised! C language defined in the header file may not be able to use? Everybody help look

Time:04-08




I am vivado HLS written in a 2 ASK modulation of signal code, want to ASK in the header file defines whether the array will not be erased in running after ASK function and error always said my conflicting types for ASK after checked on the net what function is not more than statement or declaration conflict but do not have this problem I check code found great god know ah

CodePudding user response:

 
ASK (input_1);//do you want to call, so the definition of if you want to pass the array length, need to use another parameter

CodePudding user response:

Prompt what mistake? Main function call ASK (argument) is an array of parameters, the type is not match, a pointer and a variable's value

CodePudding user response:

reference 1st floor flying_music response:
 
ASK (input_1);//do you want to call, so the definition of if you want to pass the array length, need to use another parameter


Array length in the header file with the macro definition if you write this way can pass in an array

CodePudding user response:

reference 2 building self-confidence boy reply:
prompt what mistake? The main function call ASK (argument) is an array of parameters, the type is not match, a pointer to a variable value

Tip is conflicting types for ASK what call an array ah I preach in is a function pointer or can't go in an array

CodePudding user response:

reference 4 floor sin2xcos2x response:
Quote: refer to the second floor confident boy reply:
prompt what mistake? The main function call ASK (argument) is an array of parameters, the type is not match, a pointer to a variable value

Tip is conflicting types for ASK what call an array ah I preach in is a function pointer or not in an array oh

Can pass an array, but you have a look at what you pass in is a numeric value, and is input_1 [Bit_Num] this is a numeric value, is in the table below for Bit_Num (in the following table is the biggest Bit_Num, so here is crossing the line array) is an array of elements, the array is the address of the first array, so the array name, remove behind [Bit_Num]

CodePudding user response:

(the following table is the biggest Bit_Num - 1, so here is crossing the line array)

Correct myself ~

CodePudding user response:

reference sin2xcos2x reply: 3/f
Quote: refer to 1st floor flying_music response:
 
ASK (input_1);//do you want to call, so the definition of if you want to pass the array length, need to use another parameter


Array length in the header file with the macro definition if you write this way can you pass in an array

C language array is passed through the pointer + length, cannot pass an array directly, also is to also become
Void foo (int * arr, int len); This form

CodePudding user response:

I understand the problem is resolved, thank you for this how to give to you
  • Related