Questions tagged [operand]

177 questions
1
vote
1 answer

What will be output of simple C function and why?

I need to understand and reproduce (in another language) logic of following function (C code) and I don't really understand, what it is doing double __thiscall sub_1(int this) { return * (double *) (this + 12); } It's compiled OK, but crashed…
user3095293
  • 31
  • 1
  • 2
1
vote
1 answer

Unsupported operand type(s) for /: 'unicode' and 'int'

First of all, sorry for making two questions in short interval, but I solved last one so I need help again. I'm coding bukkit plugins with jython/python... I'm pretty new to python/jython and I don't understand where I'm making mistake, take look at…
Amar Kalabić
  • 888
  • 4
  • 15
  • 33
1
vote
1 answer

obvious rpy2 usage throws an unsupported operand type(s) exception

I am getting some unexpected behaviour with rypy2: ma / robjects.r.rowSums(ma) where ma is a matrix throws an exception Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for /:…
aar cee
  • 239
  • 3
  • 10
1
vote
2 answers

Missing Operand Error

I am trying to make a batch game but every time I try to run it get the error Missing operand set was unexpected at this time here is the code: set /a temp2=(%hp% * %lvl% + %exp% * %exptill% + %wepprice% + %power% * %weppower%)/(%gold% + %pots%…
user2856418
1
vote
2 answers

Base operand has non-pointer type..but it is a pointer?

I'm working on a C++ project that deals with graphs. It has a lot of functionality related to a class "Node" and a class "Edge." At first, an Edge stored copies of its starting node and its ending node; something like: class Edge{ ... private: …
norman
  • 5,128
  • 13
  • 44
  • 75
1
vote
3 answers

What does 'invalid operands to binary == (have 'quantity' and 'int')' mean?

I'm learning c and this is an exercise in the book 'Head First C' and my code looks the same as the sample but I'm getting the above error. #include typedef enum { COUNT,POUNDS,PINTS }unit_of_measure; typedef union { short…
RapsFan1981
  • 1,177
  • 3
  • 21
  • 61
1
vote
1 answer

Missing operand in batch file loop

I was pretty certain that this should work, but I can't see what the issue is that's causing the missing operand. The loop seems to be working fine, but for some reason the _num variable isn't incrementing as it should. It seems that set /a isn't…
rick-pri
  • 73
  • 8
1
vote
1 answer

C# Bitwise Operands Vs PHP

I'm trying to convert some C# code into PHP. The C# code is as follows: strRequest="\auth\\pid\3045\ch\ehCkPNGS\resp\1529559b837decb2e0ed2f576806f10aeda4d9cdf781acd3e53ad1c3b11a20684f131229\ip\16777343\skey\3759\reqproof\1"; byte[] sendBuffer =…
Dave Maltby
  • 23
  • 1
  • 3
1
vote
2 answers

Batch: During my code loop it stops setting a variable. All Help Welcome

goto time :time set tm=%time% set hh=%tm:~0,2% set mm=%tm:~3,2% set ss=%tm:~6,2% set ms=%tm:~7,2% goto date :date set dt=%date% set wd=%dt:~0,3% set mh=%dt:~4,2% set dy=%dt:~6,2% set yr=%dt:~8,4% goto scheduletimes :scheduletimes goto…
Troy Rash
  • 29
  • 4
1
vote
4 answers

"Error: No operator "=" matches these operands"

I'm having this weird problem where the compiler is highlighting "=" and "!=" as errors claiming that there are no matching operands but I have no idea how. Here's my code: #pragma once #include "Console.h" #include "RandomNumber.h" #include…
user2288204
  • 15
  • 1
  • 5
1
vote
12 answers

Or operand with int in if statement

My problem is that program is not reading codes as i intended "he" would. I have if (hero.getPos() == (6 | 11 | 16)) { move = new Object[] {"Up", "Right", "Left"}; } else { move = new Object[] {"Up", "Down", "Right", "Left"}; } When hero…
Hans
  • 752
  • 1
  • 15
  • 29
0
votes
1 answer

left operand must be l-value

could some one help. getting error with these 2 lines of code. num_red - count_red = red_pot;// all defined as 0 and while (count_red = 0 && count_yellow = 0 && count_green = 0 && count_brown = 0 && count_blue = 0 && count_pink = 0) { …
user992520
0
votes
1 answer

Why do I get "illegal operand" errors when compiling SPARC assembly with GCC (2 lines, cmp and bl instructions)?

GCC complains that: A3.s: Assembler messages: A3.s:32: Error: Illegal operands A3.s:33: Error: Illegal operands The offending lines (italicized) and surrounding code are: b random_init_for_test nop random_init_for_test: **set 0, i_s cmp i_s,…
0
votes
1 answer

MySQL: JOIN syntax + selects within selects = Operand Error

I've been wrestling with this query for a while. Here it is: select First10.mal, Last10.family_name, (select * from gender2 JOIN (select * from status) as Mix1 JOIN (select * from age as Mix2 order by rand() limit 10) as Mix3 JOIN (select incidentid…
Michael
  • 107
  • 1
  • 2
  • 9
0
votes
2 answers

c++: Why minus signal in front of an integer gives a crazy number?

I'm using an integer from a SFML class to fetch the y coordinate of the current window: sf::window.getSize().y This brings for example the value: 300 But I want the negative value, so I put the minus sign in front: - sf::window.getSize().y Then I…
Rogério Dec
  • 801
  • 8
  • 31