#what is the problem

5 messages · Page 1 of 1 (latest)

modest crowBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

#

@frigid tinsel

Please Do Not Delete Posts!

Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.

frigid tinsel
#

hello it is my first day of c and i dont see where is the probleme with my code can u help me please

ornate gazelleBOT
#
Compiler Output
<source>: In function 'addition':
<source>:5:13: error: 'a' redeclared as different kind of symbol
    5 |         int a = *a + *b;
      |             ^
<source>:3:21: note: previous definition of 'a' with type 'int *'
    3 | int addition( int * a, int * b )
      |               ~~~~~~^
<source>: In function 'main':
<source>:16:37: error: invalid operands to binary + (have 'int *' and 'int *')
   16 |         int resultat = addition( &a + &b );
      |                                  ~~ ^ ~~
      |                                  |    |
      |                                  |    int *
      |                                  int *
<source>:16:24: error: too few arguments to function 'addition'
   16 |         int resultat = addition( &a + &b );
      |                        ^~~~~~~~
<source>:3:5: note: declared here
    3 | int addition( int * a, int * b )
      |     ^~~~~~~~
Build failed