473,385 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

structs help

Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the
listNodePtr variable to null like this...

listNodePtr *head = NULL;

First as far as I understand listNode and *listNodePtr are
variables of type ln. However I have also learned, so I thought,
that listNodePtr is an alias to the struct ln. So my statement
above should be legal. Is It?

When I try to pass my new listNodePtr variable *head to my
listInsert method like........

listInsert(head,1,2);

it doesn't work. It builds but at run time my program hangs
when inside the listInsert method the first if condition
tries to determine of the listNodePtr *list is null or not.
i.e. if( *list == NULL )..... this is where the program quits.

The method definition looks like...

void listInsert(listNodePtr *list, int key, int value)

I am assuming the body of the method is correct as this code
was given to us to use by my Prof.

Please help what am I doing wrong during my initialization?
How do I use structs defined like the one above?

Thanks in advance.
Nov 14 '05 #1
11 1298
Dave Cooke wrote:
Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the
listNodePtr variable to null like this...

listNodePtr *head = NULL;


If you avoid using typedefs for pointers to structs, you won't make this
error.

You mean either
listNode *head = NULL; /* better */
or
listNodePtr head = NULL; /* not so good */
Nov 14 '05 #2
On Sat, 03 Apr 2004 22:36:05 -0600, Dave Cooke
<dc****@ee.umanitoba.ca> wrote:
Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;


The statement above is mixing the "typedef" mechanism with the syntax
of declaring and defining structures. The simplest usage of typedef
is:

typedef some-type identifier;

which results in the identifier being another name for the type
specified by some-type. If you want to define a struct /instance/
named listNode and a pointer to it, you'd simply omit the word
"typedef" above and that would be what you'd get (and you wouldn't
have any typedefs, so to later define another struct of the same type
you'd say:
struct In anotherOne;
).

If you want to create a typedef (type alias) for a struct of the type
you're using, you'd do something like this:

typedef struct In {
/* all your member declarations */
} In;

I used the same name for the typedef as for the structure tag, because
that happens to me my own personal style; you might choose to do
otherwise, but this is perfectly legal.

So after that, you could just say:

In listNode, *listNodeptr;

Because the compiler would have been confused from the point of your
original typedef statement above on, I'll just stop here and let you
approach the problem anew based on this info.

Good luck,
-leor
Nov 14 '05 #3


Dave Cooke wrote:
Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the
listNodePtr variable to null like this...

listNodePtr *head = NULL;
The typedef has you confused.
Here head would be an alias for type
struct ln **

What you wnat is
listNodePtr head;

First as far as I understand listNode and *listNodePtr are
variables of type ln. However I have also learned, so I thought,
that listNodePtr is an alias to the struct ln. So my statement
above should be legal. Is It?

When I try to pass my new listNodePtr variable *head to my
listInsert method like........

listInsert(head,1,2);

The call would be:
listInsert(&head,1,2)
it doesn't work. It builds but at run time my program hangs
when inside the listInsert method the first if condition
tries to determine of the listNodePtr *list is null or not.
i.e. if( *list == NULL )..... this is where the program quits.

The method definition looks like...

void listInsert(listNodePtr *list, int key, int value)

This function looks ok except I would change the value type to
represent success on the Insert.

Example:
#include <stdlib.h>
#include <stdio.h>

typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

int listInsert( listNodePtr *p, int key, int data);
void printList(listNodePtr p);
void freeList(listNodePtr *p);

int main(void)
{
listNodePtr head = NULL;
listNode cp = {0}; /* to store a copy of head's values */

listInsert(&head,1,31);
listInsert(&head, 5,45);
listInsert(&head, 6,48);
printList(head);
if(head != NULL)
{
cp = *head;
freeList(&head);
if(head == NULL) puts("\nAfter freeing head, head = NULL");
puts("cp has a copy of head's member values");
printf("cp.key = %d\t\tcp.data = %d\n",cp.key,cp.data);
}
return 0;
}
int listInsert( listNodePtr *p, int key, int data)
{
listNodePtr new;

new = malloc(sizeof *new);
if(new == NULL) return 0;
new->key = key;
new->data = data;
new->next = *p;
*p = new;
return 1;
}

void printList(listNodePtr p)
{
size_t i;

for(i = 1 ; p ; i++, p = p->next)
printf("%u. key = %d\t\tdata = %d\n",
i,p->key, p->data);
return;
}

void freeList(listNodePtr *p)
{
listNodePtr tmp;

for( ; *p ;*p = tmp )
{
tmp = (*p)->next;
free(*p);
}
return;
}

--
Al Bowers
Tampa, Fl USA
mailto: xa******@myrapidsys.com (remove the x to send email)
http://www.geocities.com/abowers822/

Nov 14 '05 #4
> typedef struct In {
/* all your member declarations */
} In;

I used the same name for the typedef as for the structure tag, because
that happens to me my own personal style; you might choose to do
otherwise, but this is perfectly legal.
Although some compilers don't like it (even if it is legal!)

I've had to go through code written for one compiler and edit all the struct
definitions for another one because all of the structures defined used the
same name and the second compiler didn't like it.

This was for an embedded system... can't remember the specific compiler...
anyway, for best code portability, use different names:

typedef my_struct_tag {
int my_int;
float my_float;
} my_struct_t, *p_my_struct_t;

"Leor Zolman" <le**@bdsoft.com> wrote in message
news:kf********************************@4ax.com... On Sat, 03 Apr 2004 22:36:05 -0600, Dave Cooke
<dc****@ee.umanitoba.ca> wrote:
Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;


The statement above is mixing the "typedef" mechanism with the syntax
of declaring and defining structures. The simplest usage of typedef
is:

typedef some-type identifier;

which results in the identifier being another name for the type
specified by some-type. If you want to define a struct /instance/
named listNode and a pointer to it, you'd simply omit the word
"typedef" above and that would be what you'd get (and you wouldn't
have any typedefs, so to later define another struct of the same type
you'd say:
struct In anotherOne;
).

If you want to create a typedef (type alias) for a struct of the type
you're using, you'd do something like this:

typedef struct In {
/* all your member declarations */
} In;

I used the same name for the typedef as for the structure tag, because
that happens to me my own personal style; you might choose to do
otherwise, but this is perfectly legal.

So after that, you could just say:

In listNode, *listNodeptr;

Because the compiler would have been confused from the point of your
original typedef statement above on, I'll just stop here and let you
approach the problem anew based on this info.

Good luck,
-leor


Nov 14 '05 #5
>"Leor Zolman" <le**@bdsoft.com> wrote in message
news:kf********************************@4ax.com.. .
I used the same name for the typedef as for the structure tag, because
that happens to me my own personal style; you might choose to do
otherwise, but this is perfectly legal.

In article <news:by********************@newsb.telia.net>
Chris Fogelklou <ch*************@comhem.se> writes:Although some compilers don't like it (even if it is legal!)

I've had to go through code written for one compiler and edit all the struct
definitions for another one because all of the structures defined used the
same name and the second compiler didn't like it.

This was for an embedded system... can't remember the specific compiler...
The C standards (original ANSI C89, ISO C90, and ISO C99) are quite
clear: structure tag names are in a separate name space and *must*
not interfere with any other identifiers in the ordinary name space
used for variables, functions, and typedef-names. So this particular
compiler was just plain broken.

Of course, if you have to use a broken tool, you have to use a
broken tool. :-) But I would put this next bit differently:
anyway, for best code portability, use different names:

typedef struct my_struct_tag {
int my_int;
float my_float;
} my_struct_t, *p_my_struct_t;


As I like to point out, the real problem with typedef is that it
lies to humans and confuses them.

First, the keyword itself has the wrong name: it does not define
a type, but rather changes variable declarations into aliases for
some existing type(s):

int a, *b, c[3]; /* declare a as int, *b as int (and thus
b as pointer to int), c[i] as int (and thus c as array of
int, with the number of elements in the array being 3) */

typedef int a, *b, c[3]; /* change the above "declare ... as"
to "declare ... as an alias for": a is an alias for int,
b is an alias for pointer-to-int, and c is an alias for
array-3-of-int. */

This is even more pronounced in the "typedef struct ..." sequence,
where people seem to believe that the typedef is creating the new
type. It is not -- it is the "struct ..." part that creates the
new type.

Second, the syntax for using a typedef'ed name is also confusing.
As I noted in an earlier posting, it becomes impossible to look at
a code fragment and decide a priori whether something is a declaration:

int(i),(*p)[3]; /* just to show parentheses in declarations */
zorgle(blat);

The second line, which looks like a function call, changes meaning
if "zorgle" is a typedef:

typedef char *zorgle;
...
zorgle(blat); /* same as "char *blat; */

(Of course, if this code appears outside of a function, a function
call is not allowed here anyway -- at least, not in C. Other languages
that strongly resemble C *do* allow function calls in such positions.)

As with macros like:

#define MIN(a, b) ((a) < (b) ? (a) : (b))

typedef-names can surprise one if one is not aware that they *are*
typedef-names, so it is often wise to choose some marker to say
"beware, this is a typedef-name" -- just as many C programmers
write the MIN macro above in uppercase, to let other programmers
know that:

i = MIN(read_input(), x++);

is unlikely to do anything good.

The "typedef suffix" _t in Chris Fogelklou's examples is just such
a marker. If one uses it consistently, one can recognize:

zorgle_t (blat);

as a declaration (with unnecessary parentheses) without having to
go look to see whether zorgle_t is in fact a typedef. The _t suffix
tells you that it must be. (If it is not, the code is simply wrong
and needs to be fixed.)

My own preferred method is to type out the keyword "struct" each
time. I do have one exception to this: if a type-name is going to
be used heavily within a given program, so that anyone working on
that program is going to have to be aware that it *is* a type-name,
then it becomes OK to use a shorter name, even without any special
syntactic markings (such as an _t suffix or leading uppercase
letter).

The idea here is that I expect anyone working on *any* C program
to know that the C integral types are char, short, int, long, and
their explicit-sign variants (e.g., signed char and unsigned int),
the floating point types are float, double, and long double, and
for C99, the whole series of complex types, and so on. At the same
time, though, I expect any programmer working on the zorgle program
to know that the zorgle system uses a "zorgle" type with various
"semi-abstract datatype" features. If the program happens to use
some ancillary internal types in places, those might just have to
spell out the word "struct", and I might even use "struct zorgle"
anyway for the "well-known" zorgle type -- but because the type is
pervasive, it is OK to relax the "spell out the struct keyword"
rule.

This is, of course, a matter of taste. C *compilers* can keep
straight which identifiers have been typedef-aliased; whether you,
as a C programmer, choose some set(s) of rule(s) to make sure
that mere humans can also keep them straight is up to you.
--
In-Real-Life: Chris Torek, Wind River Systems
Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
email: forget about it http://web.torek.net/torek/index.html
Reading email is like searching for food in the garbage, thanks to spammers.
Nov 14 '05 #6
On 4 Apr 2004 15:42:17 GMT, Chris Torek <no****@torek.net> wrote:

[snipped wonderful essay on pros and cons of using typedef]

Thanks, Chris, that was really good. I've even got a title for you, in case
we find a place to publish that (it ought to be required reading for anyone
starting to use typedef):

"typedef Considered Harmful - Unless..."

-leor

--
Leor Zolman --- BD Software --- www.bdsoft.com
On-Site Training in C/C++, Java, Perl and Unix
C++ users: Download BD Software's free STL Error Message Decryptor at:
www.bdsoft.com/tools/stlfilt.html
Nov 14 '05 #7
On Sat, 03 Apr 2004 22:36:05 -0600, Dave Cooke
<dc****@ee.umanitoba.ca> wrote:
Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the
C does not have methods. It has functions.
listNodePtr variable to null like this...

listNodePtr *head = NULL;

First as far as I understand listNode and *listNodePtr are
variables of type ln. However I have also learned, so I thought,
No. No neither is a variable. listNode is a typedef (a type alias)
for the type struct ln. listNodePtr is an alias for the type struct
ln*. *listNodePtr is exactly the same type as listNode.
that listNodePtr is an alias to the struct ln. So my statement
No, as noted above, it is an alias to the type struct ln*.
above should be legal. Is It?
Yes it is legal. (Your compiler did not generate a syntax error, did
it?) head has type struct ln** or pointer to pointer to struct ln.
Is it what you want? We can't tell; you did not show us the code that
uses it. Post a compilable program that exhibits the behavior you are
asking about.

When I try to pass my new listNodePtr variable *head to my
listInsert method like........

listInsert(head,1,2);

it doesn't work. It builds but at run time my program hangs
It either builds or it hangs. I have yet to see a program do both.
when inside the listInsert method the first if condition
tries to determine of the listNodePtr *list is null or not.
i.e. if( *list == NULL )..... this is where the program quits.
Does it quit or does it hang?

From what little code you have shown, this invokes undefined behavior.
The variable head in main is passed as an argument to listInsert,
corresponding to the parameter list. Both have the type struct ln**.
head is initialized to NULL. Therefore, this is the value assigned to
list at entry to listInsert. Your code attempts to dereference list
(that is what *list means). You are not allowed to dereference a NULL
pointer.

Your comment says you want to determine if list is NULL. You do that
with
if (list == NULL) ...

The method definition looks like...

void listInsert(listNodePtr *list, int key, int value)
Since C passes by value, how do you expect the results of this
function to be available to the calling function. Anything you do to
list will disappear as soon as listInsert returns.

I am assuming the body of the method is correct as this code
was given to us to use by my Prof.

Please help what am I doing wrong during my initialization?
How do I use structs defined like the one above?


Your post indicates some misconceptions about C. Some may be
considered simply semantic (methods vs functions). Others seem to be
more basic, such as pointer syntax.

When you declare a pointer (or typedef a pointer type), you use
the asterisk to indicate the variable or type is a pointer. When you
evaluate a pointer variable in your code, you do not use the asterisk
because in that context the asterisk means dereference the pointer.

As others have mentioned, using typedef to create a pointer alias
is strongly not recommended.

Functions that manipulate linked lists usually use the return type to
send information back to the calling function. If you set the return
type of listInsert to struct ln* (or the equivalent listNode*), you
could then change head and list to this type and return list from the
listInsert.

If you really want to use pointer to pointer in listInsert (there are
times when this may be desirable), you should change head but pass
&head as the argument. list will still be a struct ln** but:

When you evaluate list, you get the address of head, not the
contents of head.

When you dereference list with *list, you are no longer attempting
to dereference a NULL pointer. list points to head and when you
dereference list you get the value in head which is NULL which makes
your if statement correct.
<<Remove the del for email>>
Nov 14 '05 #8
On Sun, 04 Apr 2004 07:33:12 -0400, Al Bowers wrote:


Dave Cooke wrote:
Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the
listNodePtr variable to null like this...

listNodePtr *head = NULL;


The typedef has you confused.
Here head would be an alias for type
struct ln **

What you wnat is
listNodePtr head;

First as far as I understand listNode and *listNodePtr are
variables of type ln. However I have also learned, so I thought,
that listNodePtr is an alias to the struct ln. So my statement
above should be legal. Is It?

When I try to pass my new listNodePtr variable *head to my
listInsert method like........

listInsert(head,1,2);


The call would be:
listInsert(&head,1,2)
it doesn't work. It builds but at run time my program hangs
when inside the listInsert method the first if condition
tries to determine of the listNodePtr *list is null or not.
i.e. if( *list == NULL )..... this is where the program quits.

The method definition looks like...

void listInsert(listNodePtr *list, int key, int value)

This function looks ok except I would change the value type to
represent success on the Insert.

Example:
#include <stdlib.h>
#include <stdio.h>

typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

int listInsert( listNodePtr *p, int key, int data);
void printList(listNodePtr p);
void freeList(listNodePtr *p);

int main(void)
{
listNodePtr head = NULL;
listNode cp = {0}; /* to store a copy of head's values */

listInsert(&head,1,31);
listInsert(&head, 5,45);
listInsert(&head, 6,48);
printList(head);
if(head != NULL)
{
cp = *head;
freeList(&head);
if(head == NULL) puts("\nAfter freeing head, head = NULL");
puts("cp has a copy of head's member values");
printf("cp.key = %d\t\tcp.data = %d\n",cp.key,cp.data);
}
return 0;
}
int listInsert( listNodePtr *p, int key, int data)
{
listNodePtr new;

new = malloc(sizeof *new);
if(new == NULL) return 0;
new->key = key;
new->data = data;
new->next = *p;
*p = new;
return 1;
}

void printList(listNodePtr p)
{
size_t i;

for(i = 1 ; p ; i++, p = p->next)
printf("%u. key = %d\t\tdata = %d\n",
i,p->key, p->data);
return;
}

void freeList(listNodePtr *p)
{
listNodePtr tmp;

for( ; *p ;*p = tmp )
{
tmp = (*p)->next;
free(*p);
}
return;
}


Sorry for not getting back to you guys,
WOW a night full of headache's is gone!
.....sort of...I guess I just will have to
create new ones!.

Thanks for the code examples. I am soooo
used to Java and C++. C++ I have to manage
pointers but C is sooo much different.

Thanks for the tip on the return type for the
"functions" :). It makes perfect sense.

Its frustrating when you have your algorithm worked
out on paper but you can't implement it cause you
don't know the language you are supposed to use!

You saved my lots of time thanks again.

Dave


Nov 14 '05 #9
On Sun, 04 Apr 2004 16:41:47 +0000, Leor Zolman wrote:
On 4 Apr 2004 15:42:17 GMT, Chris Torek <no****@torek.net> wrote:

[snipped wonderful essay on pros and cons of using typedef]

Thanks, Chris, that was really good. I've even got a title for you, in case
we find a place to publish that (it ought to be required reading for anyone
starting to use typedef):

"typedef Considered Harmful - Unless..."

-leor


Thanks Chris and Leor for the clarification. It has helped,
de-confuse this human....at least a little anyway.
Now on to the next confusing part trying to build a "simple"
memory manager for my next "AND LAST!" assignment :).

Thanks again.

Dave

Nov 14 '05 #10


Barry Schwarz wrote:
On Sat, 03 Apr 2004 22:36:05 -0600, Dave Cooke
<dc****@ee.umanitoba.ca> wrote:

Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the

C does not have methods. It has functions.

listNodePtr variable to null like this...

listNodePtr *head = NULL;
I suspect the OP wants:
listNodePtr head = NULL;

When I try to pass my new listNodePtr variable *head to my
listInsert method like........

listInsert(head,1,2);
The call:
listInsert(&head,1,2);

The method definition looks like...

void listInsert(listNodePtr *list, int key, int value)

Since C passes by value, how do you expect the results of this
function to be available to the calling function. Anything you do to
list will disappear as soon as listInsert returns.


Actually this prototype looks correct. It can modify a variable
in the calling function.
For example in the following, the value of head will be modified
should the function listInsert successfully allocate storage.

#include <stdlib.h>
#include <stdio.h>

typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

void listInsert( listNodePtr *p, int key, int data);

int main(void)
{
listNodePtr head = NULL;

printf("In Main: Before call to listInsert function head"
" is %sNULL\n", head?"not ":"");
listInsert(&head,1,31);
printf("In Main: After call to listInsert function head"
" is %sNULL\n", head?"not ":"");
free(head);
return 0;
}
void listInsert( listNodePtr *p, int key, int data)
{
listNodePtr new;

new = malloc(sizeof *new);
if(new != NULL)
{
new->key = key;
new->data = data;
new->next = *p;
*p = new;
}
return;
}

--
Al Bowers
Tampa, Fl USA
mailto: xa******@myrapidsys.com (remove the x to send email)
http://www.geocities.com/abowers822/

Nov 14 '05 #11
On Sun, 04 Apr 2004 21:00:09 -0400, Al Bowers <xa******@rapidsys.com>
wrote:
Barry Schwarz wrote:
On Sat, 03 Apr 2004 22:36:05 -0600, Dave Cooke
<dc****@ee.umanitoba.ca> wrote:

Hi I am very new to C. I am trying to figure out how to initialize
a struct in my main program.
The struct is declared in anouther header file like this...
typedef struct ln {
int key;
int data;
struct ln *next;
} listNode, *listNodePtr;

just to test in my main method I tried to initialize the

C does not have methods. It has functions.

listNodePtr variable to null like this...

listNodePtr *head = NULL;
I suspect the OP wants:
listNodePtr head = NULL;

When I try to pass my new listNodePtr variable *head to my
listInsert method like........

listInsert(head,1,2);
The call:
listInsert(&head,1,2);

The method definition looks like...

void listInsert(listNodePtr *list, int key, int value)

Since C passes by value, how do you expect the results of this
function to be available to the calling function. Anything you do to
list will disappear as soon as listInsert returns.


Actually this prototype looks correct. It can modify a variable
in the calling function.


Of course it can but only if the argument is of the form &variable or
equivalent. The OP's argument wasn't and therefore it couldn't. All
of which was covered in the subsequent paragraphs of my response which
you chose to omit.
<<Remove the del for email>>
Nov 14 '05 #12

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

Similar topics

11
by: Roman Hartmann | last post by:
hello, I do have a question regarding structs. I have a struct (profil) which has a pointer to another struct (point). The struct profil stores the coordinates of points. The problem is that I...
10
by: Angel | last post by:
I'm using several C functions (in a dll) that receive a struct as parameter. Since I'm doing it in C#, I assume I need to recreate the struct in C# in order to call the function with the required...
6
by: marabo82 | last post by:
Hi, i know that typedef structs creates an aliases for a particular struct in C++. i m trying to convert .h c++ files to a namespace in C#.net so that i use C++ DLL in my C# application. one of...
3
by: marabo82 | last post by:
Hi, i know that typedef structs creates an aliases for a particular struct in C++. i m trying to convert .h c++ files to a namespace in C#.net so that i use C++ DLL in my C# application. one of...
5
by: Steve Edwards | last post by:
Hi, With much help from this forum I've been using stl containers, but always with other common - or stl - types as members. I've now run in to a problem while trying to use some of my own...
61
by: Marty | last post by:
I am new to C# and to structs so this could be easy or just not possible. I have a struct defined called Branch If I use Branch myBranch = new Branch(i); // everything works If I use Branch...
4
by: engggirl3000 | last post by:
I was told to write a function that will read data, in a user defined text file, into a vector of structs. I am not sure where to start with this. Could some one tell me what is a vector of...
29
by: Dom | last post by:
I'm really confused by the difference between a Struct and a Class? Sometimes, I want just a group of fields to go together. A Class without methods seems wrong, in that it carries too much...
1
by: radskate360 | last post by:
Hi I am newer to programming and need a bit of help with this program. OK, heres the directions. The distance between two places on earth can be calculated by using their latitudes and...
2
by: jonpb | last post by:
Using .NET 3.5, I need to pass an array of structs as parameter to a C++ unmanaged function. The C++ dll stores some data in an unmanaged cache, the function writes the values into the array of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.