473,467 Members | 1,446 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Assignment to structures

What might the problems be in the following code?:

The problems occur at these two lines:
<snippage>
p.L2 = {5,6,10,12,255};
<snippage>
q={{0,0,5,6,128},{5,6,-10,6,128},1};
<...>

The error messages are presented after the source code.

Gary Schnabl
Detroit

************************************************** **

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */

#pragma LINK_INFO DERIVATIVE "mc9s12c32"
void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255};
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};
q=p;
};
void main(void) {
/* put your own code here */
EnableInterrupts;

for(;;) {} /* wait forever */
}
************************************************** *************
Error messages:

Error : C2450: Expected: . * + - & ! ~ ++ -- -> [ ( IDENT CONSTANT
STRING sizeof __alignof__ __va_sizeof__ __va_arg_type__

main.c line 30

Error : C1822: Type mismatch (expected 'theline ', given 'error ')

main.c line 30

Error : C1806: Illegal cast-operation

main.c line 30

Error : C2801: ';' missing

main.c line 30

Error : C2450: Expected: . * + - & ! ~ ++ -- -> [ ( IDENT CONSTANT
STRING sizeof __alignof__ __va_sizeof__ __va_arg_type__

main.c line 34

Error : C1822: Type mismatch (expected 'thepath ', given 'error ')

main.c line 34

Error : C1806: Illegal cast-operation

main.c line 34

Error : C2801: ';' missing

main.c line 34

Error : C2801: '}' missing

main.c line 34

Error : C2801: ';' missing

main.c line 34

Error : C2801: '}' missing

main.c line 34

Error : Compile failed

Nov 14 '05 #1
8 6428
Gary Schnabl wrote:
What might the problems be in the following code?:
The OP's code is after the corrected code, which requires C99.
[Corrected code]
#if 0
/* mha: Two erroneous inclusions of non-standard headers which are
also not provided. */
#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */

/* mha: ignored pragma */
#pragma LINK_INFO DERIVATIVE "mc9s12c32"
#endif

void Setp(void);

struct theline
{
int x1, y1; /* starting point */
int x2, y2; /* starting point */
unsigned char color; /* mha: since char may be signed, this
is changed to unsigned so the
attempted assignment of 255 to it
does not cause a problem. */
};
typedef struct theline line;

struct thepath
{
line L1, L2; /* two lines */
char direction;
};
typedef struct thepath path;
path p; /* global */
void Setp(void)
{
line myLine;
path q;
p.L1.x1 = 5; /* black line from 5,6 to 10,12 */
p.L1.y1 = 6;
p.L1.x2 = 10;
p.L1.y2 = 12;
p.L1.color = 255;
p.L2 = (line) {
5, 6, 10, 12, 255}; /* mha: fixed RHS; still illegal if not
C99 */
/* black line from 5,6 to 10,12 */
p.direction = -1;
myLine = p.L1;
q = (path) { {
0, 0, 5, 6, 128}, {
5, 6, -10, 6, 128}, 1}; /* mha: fixed RHS; still illegal if not
C99 */
q = p;
} /* mha: removed illegal ';' */
int /* mha: fixed illegal 'void' */ main(void)
{
/* put your own code here */
#if 0
/* mha: 'EnableInterrupts' is an undeclared identifier */
EnableInterrupts;
#endif

for (;;) {
} /* wait forever */
return 0; /* mha: a good idea even if C99 lets us
get away without it. */
}
[OP's code]

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */

#pragma LINK_INFO DERIVATIVE "mc9s12c32"
void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255};
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};
q=p;
};
void main(void) {
/* put your own code here */
EnableInterrupts;

for(;;) {} /* wait forever */
}

Nov 14 '05 #2
Gary Schnabl wrote:
What might the problems be in the following code?:

The problems occur at these two lines:
<snippage>
p.L2 = {5,6,10,12,255};
<snippage>
q={{0,0,5,6,128},{5,6,-10,6,128},1};
<...>

The error messages are presented after the source code.

Gary Schnabl
Detroit

************************************************** **

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */
Non-standard headers.
#pragma LINK_INFO DERIVATIVE "mc9s12c32"
Non-standard pragma
void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255}; What is this supposed to be? You can use a form (somewhat) like this to
*initialize* a structure, but not in an assignment.
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};
So let me get this straight...you're trying -- unsuccessfully, I might
add -- to assign something to `q' (which, itself, is local to a function
returning void)... q=p;
And then immediately *reassigning* `q'...which goes away when the
function exits anyway. };
void main(void) {
`main' returns `int'.
/* put your own code here */
EnableInterrupts;
Non-standard function.
for(;;) {} /* wait forever */
}


What are you trying to do here? Do you have a (decent) book that covers
standard C? Have you read the FAQ?

Now mind you, you could *initialize* `p' like this:

struct thepath p = {{{5, 6}, {10, 12}, 255},
{{5, 6}, {10, 12}, 255},
1};

Get a book. Read the FAQ.
And by all means try again.

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Nov 14 '05 #3
On Fri, 25 Mar 2005 22:54:36 -0500, "Gary Schnabl"
<gs******@LivernoisYards.com> wrote in comp.lang.c:
What might the problems be in the following code?:

The problems occur at these two lines:
<snippage>
p.L2 = {5,6,10,12,255};
<snippage>
q={{0,0,5,6,128},{5,6,-10,6,128},1};
<...>

The error messages are presented after the source code.

Gary Schnabl
Detroit

************************************************** **

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */

#pragma LINK_INFO DERIVATIVE "mc9s12c32"
void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255};
p.L2 is a theLine structure. You cannot assign a collection of
multiple values to a structure in this way. You can only assign
another structure of the same type to a structure. That can be from
another structure object of the same type, or if you have a C99
compiler, a struct literal.

But the code, as written above, is just plain not legal C. You need
to assign to the individual elements of p.L2 just as you did to p.L1.
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};
The same thing here. You can use this syntax to initialize a
structure in the line where you define it, but not to assign to it.
q=p;
};


I'd suggest you get a book on C if you don't have one already. The
second edition of "The C Programming Language" by Kernighan and
Ritchie is excellent.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #4

"Artie Gold" <ar*******@austin.rr.com> wrote in message
news:3a*************@individual.net...
Gary Schnabl wrote:
What might the problems be in the following code?:

The problems occur at these two lines:
<snippage>
p.L2 = {5,6,10,12,255};
<snippage>
q={{0,0,5,6,128},{5,6,-10,6,128},1};
<...>

The error messages are presented after the source code.

Gary Schnabl
Detroit

************************************************** **

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */


Non-standard headers.

#pragma LINK_INFO DERIVATIVE "mc9s12c32"

Non-standard pragma

void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255};

What is this supposed to be? You can use a form (somewhat) like this to
*initialize* a structure, but not in an assignment.
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};


So let me get this straight...you're trying -- unsuccessfully, I might
add -- to assign something to `q' (which, itself, is local to a function
returning void)...
q=p;


And then immediately *reassigning* `q'...which goes away when the
function exits anyway.
};
void main(void) {


`main' returns `int'.
/* put your own code here */
EnableInterrupts;


Non-standard function.

for(;;) {} /* wait forever */
}


What are you trying to do here? Do you have a (decent) book that covers
standard C? Have you read the FAQ?

Now mind you, you could *initialize* `p' like this:

struct thepath p = {{{5, 6}, {10, 12}, 255},
{{5, 6}, {10, 12}, 255},
1};

Get a book. Read the FAQ.
And by all means try again.

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays


I'm not claiming that this would be portable ANSI-C code. This code snippet
was described in Professor Jonathan Valvano's tutorial (at the U of TX in
Austin) to be used with the CodeWarrior IDE for developing firmware for the
Freescale Semiconductor HC11 or HC12 embedded microprocessors.
http://www.ece.utexas.edu/~valvano/e...ap9.htm#ACCESS

The headers used are those that CodeWarrior uses for a particular CPU
derivative - the Freescale Semiconductor MC9S12C32 in this case - and the
hidef.h is the header that probably originated with the (German?) Hiware
software that Metrowerks acquired a few years ago.

I wasn't attempting to initialize the structure or its members, but assign
to them. I'm simply following some code that was in the tutorial I mentioned
in the preceding paragraph. I know the difference between local and global
variables and their scopes. Perhaps there could have been further code later
included in the function for using q. I didn't author the example in the
tutorial, but am simply trying to test it with my CodeWarrior version.

However, my IDE would not accept Professor Valvano's code, as written. C
used for developing firmware for embedded microprocessors may or will
deviate from ANSI-C in some respects through its optional configurations.
I'm using the CodeWarrior factory defaults, which generally cause few
problems with ANSI-C, as far as I knew.

Since this won't properly compile, perhaps you should take this up with
Professor Valvano, as you both reside in or near Austin.
Gary Schnabl
(Southwest) Detroit
Nov 14 '05 #5
On Sat, 26 Mar 2005 01:08:31 -0500, "Gary Schnabl"
<gs******@LivernoisYards.com> wrote in comp.lang.c:

"Artie Gold" <ar*******@austin.rr.com> wrote in message
news:3a*************@individual.net...
Gary Schnabl wrote:
What might the problems be in the following code?:

The problems occur at these two lines:
<snippage>
p.L2 = {5,6,10,12,255};
<snippage>
q={{0,0,5,6,128},{5,6,-10,6,128},1};
<...>

The error messages are presented after the source code.

Gary Schnabl
Detroit

************************************************** **

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */


Non-standard headers.

#pragma LINK_INFO DERIVATIVE "mc9s12c32"

Non-standard pragma

void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255};

What is this supposed to be? You can use a form (somewhat) like this to
*initialize* a structure, but not in an assignment.
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};


So let me get this straight...you're trying -- unsuccessfully, I might
add -- to assign something to `q' (which, itself, is local to a function
returning void)...
q=p;


And then immediately *reassigning* `q'...which goes away when the
function exits anyway.
};
void main(void) {


`main' returns `int'.
/* put your own code here */
EnableInterrupts;


Non-standard function.

for(;;) {} /* wait forever */
}


What are you trying to do here? Do you have a (decent) book that covers
standard C? Have you read the FAQ?

Now mind you, you could *initialize* `p' like this:

struct thepath p = {{{5, 6}, {10, 12}, 255},
{{5, 6}, {10, 12}, 255},
1};

Get a book. Read the FAQ.
And by all means try again.

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays


I'm not claiming that this would be portable ANSI-C code. This code snippet
was described in Professor Jonathan Valvano's tutorial (at the U of TX in
Austin) to be used with the CodeWarrior IDE for developing firmware for the
Freescale Semiconductor HC11 or HC12 embedded microprocessors.
http://www.ece.utexas.edu/~valvano/e...ap9.htm#ACCESS

The headers used are those that CodeWarrior uses for a particular CPU
derivative - the Freescale Semiconductor MC9S12C32 in this case - and the
hidef.h is the header that probably originated with the (German?) Hiware
software that Metrowerks acquired a few years ago.

I wasn't attempting to initialize the structure or its members, but assign
to them. I'm simply following some code that was in the tutorial I mentioned
in the preceding paragraph. I know the difference between local and global
variables and their scopes. Perhaps there could have been further code later
included in the function for using q. I didn't author the example in the
tutorial, but am simply trying to test it with my CodeWarrior version.

However, my IDE would not accept Professor Valvano's code, as written. C
used for developing firmware for embedded microprocessors may or will
deviate from ANSI-C in some respects through its optional configurations.
I'm using the CodeWarrior factory defaults, which generally cause few
problems with ANSI-C, as far as I knew.

Since this won't properly compile, perhaps you should take this up with
Professor Valvano, as you both reside in or near Austin.


No, perhaps YOU should take it up with the professor. His code is
garbage, and I don't mean the embedded platform specific headers. I
mean lines like:

p.L2 = {5,6,10,12,255};

....and:

q={{0,0,5,6,128},{5,6,-10,6,128},1};

This is just plain not C, in any way, shape or form. I've used
CodeWarrior for the HS12 family, and it never has accepted anything
like this.

You should suggest to the professor that he actually verify that code
compiles before he includes bullSchildt in a lecture, article, or
book.

The code does not compile because it is not valid C code, not for ISO
C, not for K&R C, not for a hosted environment, not for an embedded
system.

Your C compiler won't compile COBOL either.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '05 #6

"Martin Ambuhl" <ma*****@earthlink.net> wrote in message
news:HO*****************@newsread3.news.atl.earthl ink.net...

I'll top post this so as not to get lost in the code.

(1) The nonstandard headers are used for a specific purpose which may not
always be portable C for developing firmware for embedded microprocessors.

(2) The for (;;) at the end is there so that the program never terminates
for the embedded microprocessor app. Some program code usually could be
installed there by a firmware developer. These projects may also have a
number of such loops with some means to exit them.

(3) The (plain) 8-bit char by (compiler) default will be unsigned char for
use by the Metrowerks Codewarrior (Hiware) compiler for these chips - the
Motorola (Freescale Semiconductor) HC08, HC11, or HC(S)12. The non-standard
headers have such #defines such as #define unsigned char byte and #define
unsigned int word, and also include some of the common standard C header
files. These headers should have no effect on the problem at hand - the
assignments to the structures. This code came from a tutorial written for
use with some Motorola embedded microprocessor chip series - the HC11 or
HC(S)12. Confer another reply I made for any specifics on this.
http://www.ece.utexas.edu/~valvano/e...ap9.htm#ACCESS

(4) Of course, the pragma is specific to the Hiware (CodeWarrior) compiler.

(5) I made the two casts that you cited myself earlier, in addition to
deleting the extra semicolon after the definition of Setp() in running my
own version of this code before I posted this request. BTW, I copied the
code directly from the tutorial.

(6) Perhaps, there are some options with CodeWarrior that I need to consider
before this code snippet will run. I wanted to see if I could get it
straightened on this newsgroup before I addressed Metrowerks or Professor
Valvano (U of TX) on this issue.

(7) EnableInterrupts is a macro for some inline assembly which resets a bit
in a register on the HC12 chips aftert the chip is reset.

Tnx,
GS
Gary Schnabl wrote:
What might the problems be in the following code?:


The OP's code is after the corrected code, which requires C99.
[Corrected code]
#if 0
/* mha: Two erroneous inclusions of non-standard headers which are
also not provided. */
#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */

/* mha: ignored pragma */
#pragma LINK_INFO DERIVATIVE "mc9s12c32"
#endif

void Setp(void);

struct theline
{
int x1, y1; /* starting point */
int x2, y2; /* starting point */
unsigned char color; /* mha: since char may be signed, this
is changed to unsigned so the
attempted assignment of 255 to it
does not cause a problem. */
};
typedef struct theline line;

struct thepath
{
line L1, L2; /* two lines */
char direction;
};
typedef struct thepath path;
path p; /* global */
void Setp(void)
{
line myLine;
path q;
p.L1.x1 = 5; /* black line from 5,6 to 10,12 */
p.L1.y1 = 6;
p.L1.x2 = 10;
p.L1.y2 = 12;
p.L1.color = 255;
p.L2 = (line) {
5, 6, 10, 12, 255}; /* mha: fixed RHS; still illegal if not
C99 */
/* black line from 5,6 to 10,12 */
p.direction = -1;
myLine = p.L1;
q = (path) { {
0, 0, 5, 6, 128}, {
5, 6, -10, 6, 128}, 1}; /* mha: fixed RHS; still illegal if not
C99 */
q = p;
} /* mha: removed illegal ';' */
int /* mha: fixed illegal 'void' */ main(void)
{
/* put your own code here */
#if 0
/* mha: 'EnableInterrupts' is an undeclared identifier */
EnableInterrupts;
#endif

for (;;) {
} /* wait forever */
return 0; /* mha: a good idea even if C99 lets us
get away without it. */
}
[OP's code]

#include <hidef.h> /* common defines and macros */
#include <mc9s12c32.h> /* derivative information */

#pragma LINK_INFO DERIVATIVE "mc9s12c32"
void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global
void Setp(void) { line myLine; path q;
p.L1.x1=5; // black line from 5,6 to 10,12
p.L1.y1=6;
p.L1.x2=10;
p.L1.y2=12;
p.L1.color=255;
p.L2 = {5,6,10,12,255};
// black line from 5,6 to 10,12
p.direction=-1;
myLine=p.L1;
q={{0,0,5,6,128},{5,6,-10,6,128},1};
q=p;
};
void main(void) {
/* put your own code here */
EnableInterrupts;

for(;;) {} /* wait forever */
}

Nov 14 '05 #7
"Artie Gold" <ar*******@austin.rr.com> wrote in message
news:3a*************@individual.net...

<snippage>
void Setp(void);

struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
typedef struct theline line;

struct thepath {
line L1,L2; // two lines
char direction;
};
typedef struct thepath path;
path p; // global

<more snippage>
Now mind you, you could *initialize* `p' like this:

struct thepath p = {{{5, 6}, {10, 12}, 255},
{{5, 6}, {10, 12}, 255},
1};

Get a book. Read the FAQ.
And by all means try again.

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays


Since I noticed other errors in the tutorial, I took it upon myself tonight
to check some more of Prof. Valvano's code, and that code example just
happened to be the first one I decided to check. (I didn't start at the
beginning of the tutorial and instead arbitrarily chose Chapter 9.) I didn't
recognize those two noncomforming lines of code as being something I had
previously used and was simply checking to see if the code in question was
somehow workable, albeit non-standard.

BTW, your version for the initialization of p was incorrect. Since
struct theline {
int x1,y1; // starting point
int x2,y2; // starting point
char color; // color
};
is the same as:
struct theline {
int x1;
int y1; // starting point
int x2;
int y2; // starting point
char color; // color
};
the correct initialization should be different than your version:
struct thepath p = {{{5, 6}, {10, 12}, 255},
{{5, 6}, {10, 12}, 255},
1};
and instead be:
path p = {{5, 6, 10, 12, 255},
{5, 6, 10, 12, 255},
1};

Later,
Gary Schnabl
(Southwest) Detroit - 2 miles NORTH! of Canada - Windsor, that is...


Nov 14 '05 #8
Gary Schnabl wrote:
.... snip ...
Since I noticed other errors in the tutorial, I took it upon
myself tonight to check some more of Prof. Valvano's code, and
that code example just happened to be the first one I decided to
check. (I didn't start at the beginning of the tutorial and
instead arbitrarily chose Chapter 9.) I didn't recognize those
two noncomforming lines of code as being something I had
previously used and was simply checking to see if the code in
question was somehow workable, albeit non-standard.


So why all the heat and defensiveness? You were shown, in detail,
where the code was just plain wrong. If this alleged Professor
actually is publishing these things he is shown to be completely
worthless. Maybe you should complain to his University. Maybe his
students should get refunds. At most you should make them aware of
his foolishness. Move on.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
by: Paul Rubin | last post by:
OK, I want to scan a file for lines matching a certain regexp. I'd like to use an assignment expression, like for line in file: if (g := re.match(pat, line)): croggle(g.group(1)) Since...
6
by: Neil Zanella | last post by:
Hello, I would like to know whether the following C fragment is legal in standard C and behaves as intended under conforming implementations... union foo { char c; double d; };
20
by: Michael | last post by:
Hi there, I've got a simple (newbee)-question. Is the following thing right? struct x { int a; int b; } ...
36
by: Eric Laberge | last post by:
Hi! I'm working on automatically generated code, and need to assign arrays. memcpy is an obvious solution, but it becomes complicated to use in the context I'm working on, ie.: I could use it...
5
by: Peter Seaman | last post by:
I do recognise a number of very appealing features of C#, in particular the strong typing and the need in some contexts to be very explicit regarding your intention. But the most common operator -...
5
by: subramanian | last post by:
Consdier the following program: #include <stdio.h> struct typeRecord { int id; char str; } records = { {0, "zero"}, {1, "one"},
24
by: Grey Alien | last post by:
If I have the ff struct: struct A { unsigned int i; char s; } a, b; And use them in code like this:
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.