Questions tagged [uint32]

uint32 is a datatype that represents an unsigned integer and is coded on 32 bits in memory.

uint32 is a datatype that represents an and is coded on 32 bits in memory. Unlike its counterpart which is , uint32 can only be used to store positive integers, of values between 0 and 232 - 1.

176 questions
0
votes
1 answer

A loop that works for uint64 and uint32 doesn't work for uint8 or uint16

I came up with a loop using bitwise operation, resulting in a number that has every other bit turned on (i.e. in case of 8-bit, 01010101). In theory, my loop should work just fine, and it does work fine with uint32 and uint64, but not uint8 or…
funct7
  • 3,407
  • 2
  • 27
  • 33
0
votes
1 answer

C# UInt vs Cpp DWORD conflict with negative values

C++: DWORD dwState = (DWORD)-1; Here there is no issues. C#: uint state = -1; Here, uint or UInt32 which is considered to be the equivalent of DWORD cannot have a negative value and it throws below exception. Value was either too large or too small…
Akaanthan Ccoder
  • 2,159
  • 5
  • 21
  • 37
0
votes
1 answer

Convert two UInt16 Values to one UInt32 Value consider least and most significant word

I have two UInt16 values private UInt16 leastSignificantWord; private UInt16 mostSignificantWord; The two words (UInt16 values) come from a component which divides a UInt32 status / error value into two words and returns the two words. Now i need…
Daniel W.
  • 449
  • 10
  • 29
0
votes
0 answers

Issue with boxColor and SDL_MapRGBA functions in SDL_gfx (c++)

I want to fill the screen with blue. This function works : boxColor(screen, 0, 0, 640, 640, 0x0000ffff); this one doesn't : boxColor(screen, 0, 0, 640, 640, SDL_MapRGBA(screen->format, 0, 0, 255, 255)); What am I missing with the second version?…
Kalessar
  • 293
  • 5
  • 9
0
votes
2 answers

Can I cast GameKit's peerID to uint32_t

I am using GameKit for networking in my C++ application (created an Objective-C class for managing GameKit networking), but the problem is that GameKit uses NSString (not a C++ type) to identify peers (peerID). I have tested GameKit a lot and in my…
Elviss Strazdins
  • 1,404
  • 14
  • 30
0
votes
2 answers

put uint16_t in uint32_t

char* createMSG(uint8_t i,uint16_t port) { char *buff; buff = (char*) calloc(1,6); uint8_t id, tmp; tmp = 0; id = 2; memcpy(buff, &id, sizeof(uint8_t)); memcpy(buff+1, &i, sizeof(uint8_t)); memcpy(buff+2, &port, sizeof(uint16_t)); memcpy(buff+2+2,…
user1324258
  • 561
  • 2
  • 8
  • 25
0
votes
2 answers

Error passing NSNumber to UInt32

I am trying to pass a NSNumber into a UInt32 variable, it seems to work but when I go to log the UInt32's value I get stuck. this is what my code looks like. if ([methodName isEqualToString:@"Manu"]) { cacheNumber = [cacheValue…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
0
votes
3 answers

Convert Uint8 to unsigned char RGB values

I've answered my question below. Thanks to gavinb for his assistance. Question: I'm trying to replicate a texture just for a learning experience. I'm using 24bit TGA image and i'm loading it in with SDL. I've created my own structure struct…
rocklobster
  • 609
  • 2
  • 10
  • 23
-1
votes
1 answer

Hex to Uint32 Little Endian in Delphi 7

There is a hex byte sequence: 04 9A 01 00 The HxD hex editor decodes them as "104964" (UInt 32 Little Endian). I need to implement a similar conversion in Delphi 7, but in the opposite direction: so that the number 104964 turns into 04 9A 01 00…
-1
votes
1 answer

VB.NET - Problems with SHQueryRecycleBin

I'm currently working on an application for my personal use. The idea is that you can open it up and reach all kind of stats of your computer (Recycle bin, Drives, Network and much more). Now I was working with the SHQueryRecycleBin from Win…
-1
votes
1 answer

Understanding registers

I am reading code someone else wrote and I am confused with how they defined their registers the code goes like this: Uint32 GCRO; Unit32 ; 7U; I don't understand what the second line means. The code repeats with different named registers and…
G. Wags
  • 13
  • 3
-1
votes
1 answer

Variable affected by type conversion

I have always thought that when a variable is typecast, a copy of it results and any changes affect that temporary variable. But, the screenshot below indicates otherwise. Apparently, the original variable is what changes. Why? I am curious because…
-1
votes
1 answer

How to assign a value to a Uint32 variable?

I am using SDL2 for a game project and when i am trying to assign a value to a Uint32 variable, compiler throws this error : int sdl_create_win(t_render *ress, t_map *map) { …
-1
votes
2 answers

Cannot assign a value of type "String" to type "UILabel" in swift

I'm making a program that 's about a math test random generator. But while I was creating a random operation. I used arc4random_uniform() to create a random number. Here's the function. func generateQuestion() { var randomoperation:UInt32 =…
Justsoft
  • 162
  • 4
  • 17
-1
votes
1 answer

Writing uint32 type of array contents to text file in Matlab

I am trying to read the contents of a 512*512 matrix of class uint32 to a text file. This matrix has 0s and 1s as its contents. The below code keeps returning me this error: "Cell contents reference from a non-cell array object." fileID =…
Kashif Nawaz
  • 95
  • 1
  • 1
  • 13
1 2 3
11
12