» Home » struct » Page 1
Incompatible Objective-C types initializing 'struct NSNumber *', expected 'struct NSDecimalNumber *'
by krismolendyke in Mobile Programming

I have the below method in my project, and I get a compiler warning: Incompatible Objective-C types initializing 'struct NSNumber *', expected 'struct NSDecimalNumber * on the first line:


- (IBAction)sliderValueChanged:(id)sender {
// HERE IS WHERE THE WARNING OCCURS:
NSDecimalNumber *tempNumber = [NSDecimalNumber numberWithFloat:[self.slider value]

Does the connect(2) call make use of a full struct sockaddr_in or could it just suffice with a struct in_addr?
by Wild Thing in Programming Languages

I'm curious because the man page of connect(2) is pretty short and it takes a struct sockaddr* which is normally cast anyways..


Assignment to struct member after inline cast to struct fails in Linaro version > 4.4?
by Steven Weber in Programming Languages

Why is it that the following line of kernel source:


((struct fb_var_screeninfo) (s5ptv_status.fb->var)).bits_per_pixel =
((struct fb_var_screeninfo) (fb->var)).bits_per_pixel;

compiles normally in the GNU ARM toolchain from 2010q1, and in the Linaro toolchain v4.4, but fails with the following error when using the Linaro toolchain v4.5 or v4.6?


Assignment of one struct to other struct of “structural identical” type
by mkmitch in Web Design

My problem is like this: I have a MyMail package which provides a function SendMail(MyMail.Mail) to other packages. MyMail uses the package LowLevelMail and its function Send(LowLevelMail.Mail) to actually send Mails. MyMail.Mail and LowLevelMail.Mail are identical in the sense that they define the "same


A reused named struct as a nested struct triggers a redefinition error in GCC
by Alan Xu in Programming Languages

This is a contrived example, but expresses the core problem. I have a union and a structure with the same nested structure from an existing code base:


typedef union _MyUnion
{
unsigned int A;
struct _MyNestedStruct
{
int field
} MyNestedStruct;
} MyUnion;

and


typedef struct _MyStruct
{

Iterate Over Struct; Easily Display Struct Fields And Values In a RichEdit Box
by sandorski in Programming Languages

Is there an easier way to display the struct fields and their corresponding values in RichEdit control?


This is what I am doing now:


AnsiString s;
s = IntToStr(wfc.fontColor);
RichEdit1->Lines->Append(s);

etc...


Is there an easier way than having to individually call each one? I want to read a


iterating over a list, each item consisting of a struct within a struct, difficulty getting values
by jrok96 in Programming Languages

I have a list which contains a number of _MEMORY_BASIC_INFORMATION structs nested within mb structs (defs below). What I am having problems with is getting the info from the nested _MEMORY_BASIC_INFORMATION out. I am using an iterator to traverse the list. From below I know the error is g->mbi; but I don't know how I should reference the nested struct... Thanks.


Basically I am t


Matlab: How to update struct fields “in place” using struct fun?
by GAM3RIG in Programming Languages

I have a structure


s.a = [1 2 3];
s.b = [2 3 4 5];
s.c = [9, 6 ,3];
s.d = ... % etc. - you got the gist of it

Now I want to apply a function/operation on the data stored in each field and modify the content of the field, that is I want to apply


s.a = myFun( s.a );
s.b = myFun( s.b );
s.c = myFun( s.c ); % etc. ...

C++ vectors - acessing the size of vector of type struct declared within a struct
by Andrew Forbes in Programming Languages

My declaration is as follows


#include <vector>
#include <iostream>
using namespace std;
typedef struct _ListofHops_T
{
int macAddrLtr;
int ttlValue;
}ListofHops;
struct ReadActivateLinkTrace
{
typedef std::vector < ListofHops *> ListofHopsList;
bool operationState;
};
int main()
{
Does accessing a single struct member pull the entire struct into the Cache?
by WiseUp216 in Programming Languages

I've been reading Ulrich Drepper's, "What every programmer should know about memory" and in section 3.3.2 Measurements of Cache Effects ( halfway down the page ) it gives me the impression that accessing any member of a struct causes the whole struct to get pulled into the CPU cache.


Is this correct? If so, how does the hardware know about the layout of these structs? Or does the


Next
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .