bst365体育投注网址大全

Questions tagged [c]

C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform. This tag should be used with general questions concerning the C language, as defined in the ISO 9899 standard (the latest version, 9899:2018, unless otherwise specified — also tag version-specific requests with c89, c99, c11, etc). C is distinct from C++ and it should not be combined with the C++ tag absent a rational reason.

Filter by
Sorted by
Tagged with
-1
votes
1answer
14 views

How to store a byte array in C

I'm trying to store an array of bytes with fixed size in C as a variable. The following code was my attempt: unsigned char bytes_array[4] bytes_array = 0x12345678 However, I got this error "...
0
votes
0answers
8 views

Lockfree variable update in C

I have 2 buffer of size N. I want to write to the buffer from different threads without using locks. I maintain a buffer index (0 and 1) and an offset where the new write operation to buffer starts. ...
0
votes
0answers
8 views

IMG_Load or SDL_Surface only has one RGB channel

I'm trying to load an image file and grab the pixels from it, but it seems it only has pixels stored in the red channel and they don't match up with the original image. I searched around and found ...
0
votes
1answer
25 views

Wrong Positions using fread()

I'm using this code to read a file. char *infile = argv[1]; int size = 4000000; FILE *card = fopen(infile, "r"); int *temp2 = (int*) malloc(size * sizeof(int)); fread(temp2, sizeof(int), ...
-1
votes
1answer
15 views

removing an element from the buffer

I'm trying to remove an element from a buffer but when I do it's just overriding it to 0. I'm using a buffer that has 5 elements but when I declare it to NULL, the code doesn't run... I tried to make ...
-5
votes
0answers
15 views

Chat-server in C (TCP)

I am trying to build up a chat server in C and have to figure out some questions. I use pthread_create to create a thread for each client. pthread_create(&recvt,NULL,(void *)recvmg,&sock2); I ...
0
votes
0answers
6 views

PPPOS + LWIP + FREERTOS + SARA-R412M modem -error: dereferencing pointer to incomplete type 'struct ppp_pcb'?

I have configured my lwip with sarar514 dial-up, thats works fine for data mode. I have tried to use pppos (using lwip). after activation of options in the file "lwip/src/include/netif/ppp/...
0
votes
0answers
5 views

Can't run cuda file. Error: Failed to connect sshd on “192.168.55.1:22”

Today I found out, that I am not able to run any CUDA file(but I could do it earlier). I get the next errors: 'Launching FILENAME Debug' has encountered a problem. Failed to connect sshd on "192....
0
votes
0answers
26 views

Can anyone help me on fixing some framework source errors?

How are you? Can you help me on fixing this error: frameworks/native/libs/gui/ConsumerBase.cpp:333: error: undefined reference to 'android::Fence::merge(char const*, android::sp<android::Fence> ...
2
votes
3answers
33 views

Array within Structure for printing basic informations of person

I have tried this code for printing some persons' basic information. Here is the code : #include <stdio.h> struct person { char name[100]; int age; float salary; }; int main() { ...
0
votes
0answers
7 views

convert from CSIdentity to a C-compatible string

Intro I have an objective-C file (.m) in which I'm trying to query local users (through CSGetLocalIdentityAuthority and then print each user via printf (intentionally using C). What do I expect? get ...
-9
votes
0answers
37 views

How to find every six digit number where first 3 and last 3 digit's sum are equal? [closed]

I am new to C++ and I can not make this task. I am looking for help. What I need is to find every six digit number where first 3 and last 3 digit's sum are equal.
-3
votes
0answers
30 views

how can i eliminate an integer using an if condition? [closed]

if i created a 'for loop' like this: candidate_count = get_int("\n"); for ( int i = 0; i < candidate_count; i++) along with this struct: typedef struct { string name; int votes; ...
1
vote
0answers
10 views

Flite text-to-speech program with MSVC - Unresolved external symbols

I'm trying to use MSVC to compile a C program with the Flite text-to-speech library, but I'm getting unresolved external symbol errors. I started with the "C Example" from the Flite docs but ...
1
vote
2answers
43 views

constant value for case label for switch statement in c and c++ but show different behaviour

For same program in c and c++ when we use constant integer variable as case label it is valid only in c++ and not in c also when we use constant integer array member as case label then it is not valid ...

15 30 50 per page
1
2 3 4 5
22313