Skip to content
  • About Us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions

Programming Tutorial

Start Learning to Code

  • About Us
  • Contact Us
  • Privacy Policy
  • Terms and Conditions

Breaking News

Nextjs: running code after complete fetch

why does 400 status code result always entercatch block execution with axios?

Saving the state of the button onClick

TypeScript: Specify that value must be in Array using spread operator

Show separate number with comma in django tempalte

Why does my website keep showing old index.html, style.css, app.js…?

Using Python Flask to change the colour of an icon when it detects a words like scam, pending and verified

x clear icon appears only when the input has value – react

Login button redirects to two pages. For first time loginers, it redirects to agreement page, and for rest, it redirects straight to home?

WebComponent setter not triggered if defer is used

Tag: struct

Arrays

Passing an array and its length with a struct in C weird behavior

admin July 18, 2014

I’m trying to return an array and its length from one function to another. I’ve learned that I can’t simply determine the size of the returning array in the parent function with sizeof() because …

arrayscmemorypointersstruct
Arrays

error: Parameter name omitted in C for structs

admin May 1, 2014

Some what new to coding in C, I have tried looking at other posts on stack about omitted names but cannot seem to find any based around struct parameters in C. This code is just a fragment from the .C …

arrayscstruct
Arrays

Marshal a C struct containing a variable length array

admin February 15, 2014

I would like to marshal a C struct with a variable-length array back to C# but so far I can’t get anything better than a pointer-to-struct representation and a pointer to float. Unmanaged …

arrayscmarshallingstruct
Arrays

Trie Tree and finding n words with highest number of occurrences, pointers

admin January 19, 2014

So I have this piece of code and I have to make it as it’s written in topic – find n words with highest number of occurrences, I’ve general idea of that and written it in void setorder function but I …

arrayscpointersstructtree
Arrays

Why does Malloc allocate more memory than I requested? [closed]

admin January 3, 2014

I must define a dynamic array of struct. But when I define an array this way: #include #include struct user { int id; char *name; int *friendlist; int *…

arrayscmallocpointersstruct
Linux

Writing multiple fields (struct) to fifo

admin December 23, 2013

I Need to write the following struct to a fifo: struct msg_t { int length; char* msg; }; I malloc the struct and the char* inside it and I write like this: (let’s assume msg is the variable …

cfifolinuxstruct
Arrays

using delegates in an array initialization

admin August 2, 2013

I’m coding a server and I’ve set up a TCP connection with all the clients. Now, when a Client sends a packet I check the opcode of the packet so I can process it. At the moment, I have an …

arrayscdelegatesfunctionstruct
Arrays

Best practice for storing an array of struct of undefined length

admin August 2, 2013

The question Let’s suppose that we have a struct such as: struct MyStruct { enum Type { NONE, TYPE1, TYPE2 }; Type type; int value; } Now, the application needs to store a undefined amount of …

arrayscstruct
Arrays

function with a struct array pointer as an argument, C language

admin August 2, 2013

typedef struct { char manufacturer[SIZE]; char model[SIZE]; int size; int id; int qty; double cost; double price; } tv; void firstSix(tv *tvarr[]); void firstSix(tv *…

arrayscpointersstruct
Arrays

Setting a char array from the struct with another char array

admin May 25, 2013

I have the struct: struct person { char firstname[]; }; And the method: void abcde (person* a, char firstchar[]) { a->firstname = firstchar; } The gcc throws this: incompatible types …

arraysccharmethodsstruct

Posts navigation

Previous 1 … 6 7 8 Next
Privacy Policy