Questions tagged [operands]

Operands are values acted upon by an operator, method, or other functional entity.

Operands differ from parameters in that they are the real values used or altered by a function, while the parameters are the named, abstract inputs used to define the function.

313 questions
0
votes
1 answer

Error invalid operands to binary expression in C

I am trying to move one position back in the stdin.Using this code: fpos_t fPos; fgetpos(stdin,&fPos); fPos -= 1; fsetpos(stdin,&fPos); But I get this error: invalid operands to binary expression ('fpos_t'(aka '_G_fpos_t') and 'int') But my…
0
votes
2 answers

Decimal from Integer and Invalid Operands *Updated

I am a beginner in C++ and for an assignment I wrote code for a number to English conversion. My problem is getting the decimal from an integer. Upon advice I changed the void expand to a double value and changed the code for getting the decimal,…
JUTG
  • 1
  • 2
0
votes
1 answer

Convert all binary operations in C to have 2 operands

Does anyone know of any way (compiler flags/tools) to automatically alter a piece of C source code to change the common arithmetic multi-operand operations into two-operand ones? i.e: (a = b + c * d - e ) ---becomes--> x = c * d y = x - e …
ginsunuva
  • 21
  • 1
  • 4
0
votes
1 answer

Unsupported operand types, commas with floats

I am trying to gather an number amount from user input, convert it to a float, add commas to the float, and then convert it to a string again so I can print it using Python. Here is my code: usr_name = raw_input("- Please enter your name:…
Philip McQuitty
  • 1,077
  • 9
  • 25
  • 36
0
votes
1 answer

How to handle limited operands for windows azure service?

I am using windows azure notification hub, and i got this message: Tag expression can not contain more than 6 operands So it restricted me to only 6 tags per request , and I need to send to more than 6 tags . What can I do?
0
votes
1 answer

Comparing Two values in a generic method c#

I think my code is self explanatory about what i want to achieve : private bool Comparison(T operatorOne, T operatorTwo, string operand) { switch (operand.ToLower()) { case "=": return…
isumit
  • 2,313
  • 4
  • 23
  • 28
0
votes
2 answers

Invalid operands to Binary expression ('id' and 'int')

I've this objective C code and I'm trying to apply tint effect to an image at pixel level. When I shift by 16 bits and 8 bits and then mask accordingly to get separate channels, I'm getting this error. Can someone help me out? -(void) Tint…
user3863537
  • 101
  • 1
  • 12
0
votes
3 answers

What are bad operand types for binary operator '||'?

The error I got is- Main.java:23: error: bad operand types for binary operator '||' if(c=='a'||c=='e'||c=='i'||c='o'||c=='u'||c=='y') ^ first type: boolean second type: char I didnt…
emjay
  • 43
  • 1
  • 2
  • 7
0
votes
1 answer

plus sign escape c++

hi guys im having difficulties about plus sign while getting input. here im dealing with reverse polish notation calculator. what i have to is to take input as "3 2 + $" which means(in an easy way) add 3 and 2 and show them. i tried to use…
0
votes
1 answer

Invalid combination of opcode and operands FPC

I'm trying to implement a function StrPos in assembler. I have 64-bit processor and FPC. When I'm compiling this shows the following errors: function StrPos(Str1, Str2: PChar): LONGINT; assembler; asm PUSH DS CLD …
Mila
  • 3
  • 2
0
votes
3 answers

Two condition while loop

while( first1<=last1 || first2<=last2 ) while( first1<=last1 && first2<=last2 ) I am just trying to make sure I am correct. For an "or" condition it means that it only needs one of those to be true to enter the while loop, while the "and"…
user2743857
  • 81
  • 1
  • 1
  • 6
0
votes
3 answers

How do merge two operands and one operator to an expression for a final answer?

I have the following code including two operands and one operands converted from objects. Now I would like to merge them to an expression so that I can get a final answer. For example, the method receives 2,3,* and converts it to 2*3 and returns 6.…
Markus
  • 149
  • 1
  • 8
0
votes
1 answer

C++ trouble with using a member function as an operand. error C2679

I could use some help! This is my first course in any sort of coding and I've hit my first major wall, this is with C++ classes. My problem occurs in line 19 of main.cpp: error C2679: binary '=' : no operator found which takes a right-hand operand…
0
votes
2 answers

C++ No << operator found which takes right-hand operand

I am working on some C++ homework and have hit a snag, I cannot run my displayList() function in my linkedlist class. I receive the following error. Error 1 error C2679: binary '<<' : no operator found which takes a right-hand operand of type…
Dr-ZoidBerg
  • 41
  • 3
  • 10
0
votes
2 answers

VHDL Array element in if-statement

This is my first work with VHDL so it's surely something basic but just don't know what to do. I have this code: --this is in the architecture segment type my_code is array(0 to 15) of integer; signal code: my_code; .... --here I use the…
Hitokage
  • 733
  • 8
  • 19