473,702 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory Structure Pointer Problems

Hi,
I am new to C and having problems with the following program.
Basically I am trying to read some files, loading data structures into
memory for latter searching.
I am trying to use structres and arrays of pointers to them.

I have gotten the program to compile with gcc on WinXP.

If the file i read doesnt have alot of records, it runs thru. But once
i add more, it dies. In this program i have 4 files setup to read. The
program dies on the second, the number of records it dies at varies
depending on which files i give it, usually around 30-40.

Seems like it is propably some kind of memoery issue. Sorry to post
such a big piece of code. If you guys could catch some problems i might
be having or even some suggestions for storing dynamic structures of
data. I have also tried linked list, but still seem to hit the same
problem. making me think the way i am allocating memory or using it is
causing th problems.

Thanks
#include "stdio.h"

int num_stations;

typedef struct sta {
char* name;
int num_cmpnds;
struct cmp **cmpnds;
} STA;

typedef struct cmp {
char* name;
struct blk **blocks;
} CMP;

typedef struct blk {
char* name;
char* type;
} BLK;

struct O_FILE {
int i0[2];
char spc[2];
char name[14];
int type;
int i1;
int i2;
int i3;
long wf_ptr;
int i4;
} cp_rec, cmpnd_rec;

struct cmp *new_cmp(char* name ) {
struct cmp *c = malloc(sizeof(s truct cmp *));
sprintf (c->name, "%s", name);
printf ("\tCreating CMPND %s [%d]\n", name, c);
return c;
}

struct sta *new_sta(char* name ) {
int ret;
int num_rec;
int gDebug=1;

FILE *cp;
char filepath[256];
struct sta *s = malloc(sizeof(s truct sta *));

if (s == NULL) return NULL;
s->name = name;
printf("Creatin g Station [%s] [%d]\n", s->name, s);

strcpy (filepath,name) ;
strcat (filepath,"/");
strcat (filepath,name) ;
strcat (filepath,".O") ;

if ((cp=fopen(file path,"rd"))==NU LL) {
printf("Error opening %s\n", filepath);
exit(1);
}

fseek(cp, 0, SEEK_END);
num_rec = ftell(cp) / sizeof(cp_rec);
printf ("Mem: [%d] [%d] [%d]\n", num_rec, sizeof(struct cmp *),
num_rec * sizeof(struct cmp *));
s->cmpnds = (struct cmp**) malloc(num_rec * sizeof(struct cmp *));
fseek(cp, 0, 0);

s->num_cmpnds = 0;
while (ret=fread((cha r*)&cp_rec,size of(cp_rec),1,cp )) {
s->cmpnds[s->num_cmpnds]=new_cmp(cp_rec .name);
s->num_cmpnds++ ;
if (s->num_cmpnds 10) {
break;
}
}

num_stations++;
ret=fclose(cp);
return s;
}

void print_stations( struct sta **stations) {
int s = 0;
int c = 0;
for (s=0; s<=(num_station s-1); s++) {
printf("%0d Station [%d] [%d] #[%d]\n", s, stations[s]->name,
stations[s], stations[s]->num_cmpnds);
for (c=0; c<=( stations[s]->num_cmpnds - 1); c++) {
printf("\t%0d %0d Cmpnd [%s] [%d]\n", s, c,
stations[s]->cmpnds[c]->name, stations[s]->cmpnds[c]);
}
printf("END OF CMPND
----------------------------------------------------------------\n");
}
}

int main(int argc, char *argv[]) {
struct sta **stations = (struct sta **) malloc(10 * sizeof(struct sta
*));

stations[0]=new_sta("CDCU2 1");
print_stations( stations);
stations[1]=new_sta("6DCU2 3");
print_stations( stations);
stations[2]=new_sta("CDCU2 1");
print_stations( stations);
stations[3]=new_sta("6DCU2 3");
print_stations( stations);

return (0);
}

Sep 25 '06 #1
2 3273
On 24 Sep 2006 18:47:27 -0700, "Mike" <jm******@hotma il.comwrote in
comp.lang.c:
Hi,
I am new to C and having problems with the following program.
Basically I am trying to read some files, loading data structures into
memory for latter searching.
I am trying to use structres and arrays of pointers to them.

I have gotten the program to compile with gcc on WinXP.

If the file i read doesnt have alot of records, it runs thru. But once
i add more, it dies. In this program i have 4 files setup to read. The
program dies on the second, the number of records it dies at varies
depending on which files i give it, usually around 30-40.

Seems like it is propably some kind of memoery issue. Sorry to post
such a big piece of code. If you guys could catch some problems i might
be having or even some suggestions for storing dynamic structures of
data. I have also tried linked list, but still seem to hit the same
problem. making me think the way i am allocating memory or using it is
causing th problems.

Thanks
#include "stdio.h"
The way to provide the appropriate prototypes and definitions for C's
standard input/output library functions, data types, and macros, is:

#include <stdio.h>

....what you have written produces undefined behavior if stdio.h is
included by reading an actual file of that name, and it finds another
file by that name first with the "stdio.h" form.

ALWAYS include standard C headers with the <name.hform.

You also use quite a few string functions, but have failed to include
<string.h>. And you are calling malloc(), you need to include
<stdlib.h>. Every single one of your malloc() calls is causing
undefined behavior without a proper prototype for malloc() in scope.
int num_stations;

typedef struct sta {
char* name;
int num_cmpnds;
struct cmp **cmpnds;
} STA;
Get rid of the typedefs, they serve no purpose and you don't use the
aliases you create anyway.
typedef struct cmp {
char* name;
struct blk **blocks;
} CMP;

typedef struct blk {
char* name;
char* type;
} BLK;

struct O_FILE {
int i0[2];
char spc[2];
char name[14];
int type;
int i1;
int i2;
int i3;
long wf_ptr;
int i4;
} cp_rec, cmpnd_rec;
Defining a type and instances of that type in one declaration, as you
have done above, is error prone. Sooner or later it will cause you
problems.
struct cmp *new_cmp(char* name ) {
You don't modify the characters pointed to by name inside the
function, so you should change this to:

struct cpm *new_cmp(const char *name)
struct cmp *c = malloc(sizeof(s truct cmp *));
You fail to check whether malloc() succeeded. Also you have a
terrible error here, one that you probably would not have made if you
had used the comp.lang.c recommended way of allocating memory.

Note the argument you are passing to malloc() above, namely the size
of a POINTER to a struct cmp. A pointer to a struct cmp is almost
certainly smaller than the size of an instance of struct cmp. So even
if your malloc() succeeds, you will eventually write beyond the end of
the allocated block when you access later members of the structure.

Change your memory allocations to look like this:

struct cmp *c = malloc(sizeof *c);

....or in the more general case where you want to allocate memory for
an array of N objects of type T:

T *t_pointer = malloc(N * sizeof *t_pointer);
sprintf (c->name, "%s", name);
Aside from your other problems, c->name is a pointer to char. It is
uninitialized, you haven't defined or allocated any memory for it to
point to. Passing an uninitialized pointer to sprintf() as a
destination is undefined behavior.

If you know that c->name points to a sufficiently sized array of
writeable characters, and you certainly don't in this case, you'd be
much better off using strcpy() than sprintf(), since you are not
actually performing any conversions.
printf ("\tCreating CMPND %s [%d]\n", name, c);
You are producing more undefined behavior by passing a pointer to
struct cmp to printf() with a "%d" conversion specifier. The only
portable way to use any of the *printf() functions to output a pointer
to any object type is to cast it to pointer to void and use the %p
conversion specifier:

printf ("\tCreating CMPND %s [%p]\n", name, (void *)c);

....and yes, in this case the cast is necessary.
return c;
}

struct sta *new_sta(char* name ) {
Again, should be const char *name.
int ret;
int num_rec;
int gDebug=1;

FILE *cp;
char filepath[256];
struct sta *s = malloc(sizeof(s truct sta *));
Same problem here, you are only allocating enough memory to hold a
pointer to a struct sta, not enough memory to hold an instance of one.
if (s == NULL) return NULL;
Well at least you're checking to see if malloc() succeeded here.
s->name = name;
printf("Creatin g Station [%s] [%d]\n", s->name, s);

strcpy (filepath,name) ;
strcat (filepath,"/");
strcat (filepath,name) ;
strcat (filepath,".O") ;
Do you actually want to create a string like "name/name.O"? And you
don't check to see if the total of name twice plus the three
additional characters, plus a null terminator, will fit within a 256
byte array. If the string pointed to by name is too long, you will
overwrite the end of filepath, again producing undefined behavior.
if ((cp=fopen(file path,"rd"))==NU LL) {
The mode argument you are using, "rd", is not one defined by the C
standard. It might be an extension supported by your particular
compiler, but as far as C is concerned, it is undefined. Did you
perhaps mean "rb", which opens a file in binary mode?
printf("Error opening %s\n", filepath);
exit(1);
}

fseek(cp, 0, SEEK_END);
Assuming you really meant "rb", opening the file in binary mode, be
aware that fseek() is not guaranteed to work properly for binary
files.
num_rec = ftell(cp) / sizeof(cp_rec);
There is a hideous mix of types in the expression above. The sizeof
operator yields a size_t, and ftell() returns a signed long. Then you
assign the result to an int.
printf ("Mem: [%d] [%d] [%d]\n", num_rec, sizeof(struct cmp *),
num_rec * sizeof(struct cmp *));
More undefined behavior, passing two size_t values to printf with a
"%d" conversion specifier. size_t is an implementation-defined
unsigned integer type large enough to hold the size of an object. One
thing it is guaranteed NOT to be is a signed int.

If you have a C99 conforming compiler and library, you can print
size_t values with "%z". Otherwise, use "%lu" and cast them to
(unsigned long) in the printf() call.
s->cmpnds = (struct cmp**) malloc(num_rec * sizeof(struct cmp *));
For once you're using the correct size in a call to malloc, but
suddenly you are casting the return value. NEVER cast the return of
malloc() unless you are writing code that must also compile as C++.
fseek(cp, 0, 0);
The call above can be replaces with:

rewind(cp);

....which is much more self documenting of the intent.
>
s->num_cmpnds = 0;
while (ret=fread((cha r*)&cp_rec,size of(cp_rec),1,cp )) {
The return type of fread() is a size_t, not a signed int.
s->cmpnds[s->num_cmpnds]=new_cmp(cp_rec .name);
s->num_cmpnds++ ;
if (s->num_cmpnds 10) {
break;
}
}

num_stations++;
ret=fclose(cp);
Why are you storing the return value of fclose() when you do nothing
with it?
return s;
}

void print_stations( struct sta **stations) {
int s = 0;
int c = 0;
for (s=0; s<=(num_station s-1); s++) {
printf("%0d Station [%d] [%d] #[%d]\n", s, stations[s]->name,
stations[s], stations[s]->num_cmpnds);
for (c=0; c<=( stations[s]->num_cmpnds - 1); c++) {
printf("\t%0d %0d Cmpnd [%s] [%d]\n", s, c,
stations[s]->cmpnds[c]->name, stations[s]->cmpnds[c]);
}
printf("END OF CMPND
----------------------------------------------------------------\n");
}
}

int main(int argc, char *argv[]) {
struct sta **stations = (struct sta **) malloc(10 * sizeof(struct sta
*));

stations[0]=new_sta("CDCU2 1");
print_stations( stations);
stations[1]=new_sta("6DCU2 3");
print_stations( stations);
stations[2]=new_sta("CDCU2 1");
print_stations( stations);
stations[3]=new_sta("6DCU2 3");
print_stations( stations);

return (0);
}
There are more similar errors in the rest of the code, I just got
tired. I'm amazed it runs at all. It should die much more quickly,
the way you write past the end of allocated memory.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Sep 25 '06 #2
Thanks Jack,
For taking the time to redline my program, if it can be even called a
program, LOL!

I will review your comments and try to get things implemented better.
Some of the issues like not using my typedefs, were because i was
trying different things to limit possible errors. But as you pointed
out, i still was causing alot, LOL. I have about 10 different versions
for testing, trying different things, so each propably added a new
different bad programming technique.

Again i really appreciate you taking the time, i realize it was not a
fun task. But your comments have definitely pointed out alot of things!

Thanks
Mike

Jack Klein wrote:
On 24 Sep 2006 18:47:27 -0700, "Mike" <jm******@hotma il.comwrote in
comp.lang.c:
Hi,
I am new to C and having problems with the following program.
Basically I am trying to read some files, loading data structures into
memory for latter searching.
I am trying to use structres and arrays of pointers to them.

I have gotten the program to compile with gcc on WinXP.

If the file i read doesnt have alot of records, it runs thru. But once
i add more, it dies. In this program i have 4 files setup to read. The
program dies on the second, the number of records it dies at varies
depending on which files i give it, usually around 30-40.

Seems like it is propably some kind of memoery issue. Sorry to post
such a big piece of code. If you guys could catch some problems i might
be having or even some suggestions for storing dynamic structures of
data. I have also tried linked list, but still seem to hit the same
problem. making me think the way i am allocating memory or using it is
causing th problems.

Thanks
#include "stdio.h"

The way to provide the appropriate prototypes and definitions for C's
standard input/output library functions, data types, and macros, is:

#include <stdio.h>

...what you have written produces undefined behavior if stdio.h is
included by reading an actual file of that name, and it finds another
file by that name first with the "stdio.h" form.

ALWAYS include standard C headers with the <name.hform.

You also use quite a few string functions, but have failed to include
<string.h>. And you are calling malloc(), you need to include
<stdlib.h>. Every single one of your malloc() calls is causing
undefined behavior without a proper prototype for malloc() in scope.
int num_stations;

typedef struct sta {
char* name;
int num_cmpnds;
struct cmp **cmpnds;
} STA;

Get rid of the typedefs, they serve no purpose and you don't use the
aliases you create anyway.
typedef struct cmp {
char* name;
struct blk **blocks;
} CMP;

typedef struct blk {
char* name;
char* type;
} BLK;

struct O_FILE {
int i0[2];
char spc[2];
char name[14];
int type;
int i1;
int i2;
int i3;
long wf_ptr;
int i4;
} cp_rec, cmpnd_rec;

Defining a type and instances of that type in one declaration, as you
have done above, is error prone. Sooner or later it will cause you
problems.
struct cmp *new_cmp(char* name ) {

You don't modify the characters pointed to by name inside the
function, so you should change this to:

struct cpm *new_cmp(const char *name)
struct cmp *c = malloc(sizeof(s truct cmp *));

You fail to check whether malloc() succeeded. Also you have a
terrible error here, one that you probably would not have made if you
had used the comp.lang.c recommended way of allocating memory.

Note the argument you are passing to malloc() above, namely the size
of a POINTER to a struct cmp. A pointer to a struct cmp is almost
certainly smaller than the size of an instance of struct cmp. So even
if your malloc() succeeds, you will eventually write beyond the end of
the allocated block when you access later members of the structure.

Change your memory allocations to look like this:

struct cmp *c = malloc(sizeof *c);

...or in the more general case where you want to allocate memory for
an array of N objects of type T:

T *t_pointer = malloc(N * sizeof *t_pointer);
sprintf (c->name, "%s", name);

Aside from your other problems, c->name is a pointer to char. It is
uninitialized, you haven't defined or allocated any memory for it to
point to. Passing an uninitialized pointer to sprintf() as a
destination is undefined behavior.

If you know that c->name points to a sufficiently sized array of
writeable characters, and you certainly don't in this case, you'd be
much better off using strcpy() than sprintf(), since you are not
actually performing any conversions.
printf ("\tCreating CMPND %s [%d]\n", name, c);

You are producing more undefined behavior by passing a pointer to
struct cmp to printf() with a "%d" conversion specifier. The only
portable way to use any of the *printf() functions to output a pointer
to any object type is to cast it to pointer to void and use the %p
conversion specifier:

printf ("\tCreating CMPND %s [%p]\n", name, (void *)c);

...and yes, in this case the cast is necessary.
return c;
}

struct sta *new_sta(char* name ) {

Again, should be const char *name.
int ret;
int num_rec;
int gDebug=1;

FILE *cp;
char filepath[256];
struct sta *s = malloc(sizeof(s truct sta *));

Same problem here, you are only allocating enough memory to hold a
pointer to a struct sta, not enough memory to hold an instance of one.
if (s == NULL) return NULL;

Well at least you're checking to see if malloc() succeeded here.
s->name = name;
printf("Creatin g Station [%s] [%d]\n", s->name, s);

strcpy (filepath,name) ;
strcat (filepath,"/");
strcat (filepath,name) ;
strcat (filepath,".O") ;

Do you actually want to create a string like "name/name.O"? And you
don't check to see if the total of name twice plus the three
additional characters, plus a null terminator, will fit within a 256
byte array. If the string pointed to by name is too long, you will
overwrite the end of filepath, again producing undefined behavior.
if ((cp=fopen(file path,"rd"))==NU LL) {

The mode argument you are using, "rd", is not one defined by the C
standard. It might be an extension supported by your particular
compiler, but as far as C is concerned, it is undefined. Did you
perhaps mean "rb", which opens a file in binary mode?
printf("Error opening %s\n", filepath);
exit(1);
}

fseek(cp, 0, SEEK_END);

Assuming you really meant "rb", opening the file in binary mode, be
aware that fseek() is not guaranteed to work properly for binary
files.
num_rec = ftell(cp) / sizeof(cp_rec);

There is a hideous mix of types in the expression above. The sizeof
operator yields a size_t, and ftell() returns a signed long. Then you
assign the result to an int.
printf ("Mem: [%d] [%d] [%d]\n", num_rec, sizeof(struct cmp *),
num_rec * sizeof(struct cmp *));

More undefined behavior, passing two size_t values to printf with a
"%d" conversion specifier. size_t is an implementation-defined
unsigned integer type large enough to hold the size of an object. One
thing it is guaranteed NOT to be is a signed int.

If you have a C99 conforming compiler and library, you can print
size_t values with "%z". Otherwise, use "%lu" and cast them to
(unsigned long) in the printf() call.
s->cmpnds = (struct cmp**) malloc(num_rec * sizeof(struct cmp *));

For once you're using the correct size in a call to malloc, but
suddenly you are casting the return value. NEVER cast the return of
malloc() unless you are writing code that must also compile as C++.
fseek(cp, 0, 0);

The call above can be replaces with:

rewind(cp);

...which is much more self documenting of the intent.

s->num_cmpnds = 0;
while (ret=fread((cha r*)&cp_rec,size of(cp_rec),1,cp )) {

The return type of fread() is a size_t, not a signed int.
s->cmpnds[s->num_cmpnds]=new_cmp(cp_rec .name);
s->num_cmpnds++ ;
if (s->num_cmpnds 10) {
break;
}
}

num_stations++;
ret=fclose(cp);

Why are you storing the return value of fclose() when you do nothing
with it?
return s;
}

void print_stations( struct sta **stations) {
int s = 0;
int c = 0;
for (s=0; s<=(num_station s-1); s++) {
printf("%0d Station [%d] [%d] #[%d]\n", s, stations[s]->name,
stations[s], stations[s]->num_cmpnds);
for (c=0; c<=( stations[s]->num_cmpnds - 1); c++) {
printf("\t%0d %0d Cmpnd [%s] [%d]\n", s, c,
stations[s]->cmpnds[c]->name, stations[s]->cmpnds[c]);
}
printf("END OF CMPND
----------------------------------------------------------------\n");
}
}

int main(int argc, char *argv[]) {
struct sta **stations = (struct sta **) malloc(10 * sizeof(struct sta
*));

stations[0]=new_sta("CDCU2 1");
print_stations( stations);
stations[1]=new_sta("6DCU2 3");
print_stations( stations);
stations[2]=new_sta("CDCU2 1");
print_stations( stations);
stations[3]=new_sta("6DCU2 3");
print_stations( stations);

return (0);
}

There are more similar errors in the rest of the code, I just got
tired. I'm amazed it runs at all. It should die much more quickly,
the way you write past the end of allocated memory.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Sep 25 '06 #3

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

Similar topics

5
1904
by: mikegw | last post by:
Hello all. I am currently using an implementation of sysV shared memory. The entire shared memory is allocated is one continuous block of which I get the pointer to the head, everything should be done as offsets from this. At the moment I have two data structures, a head to a linked list which in it contains the pointer to the first element in the linked list( this is redundant as far as I can work out) and the list itself. The data...
7
2096
by: boss_bhat | last post by:
Hi all , I am beginner to C programming. I have a defined astructure like the following, and i am using aliases for the different data types in the structure, typedef struct _NAME_INFO { struct _NAME_INFO *Next; ULONG LastId; ULONG Id; PVOID Value;
9
2435
by: CptDondo | last post by:
I am working on an embedded platform which has a block of battery-backed RAM. I need to store various types of data in this block of memory - for example, bitmapped data for control registers, strings for logging, and structures for data points. I want to use one function to read data from this block and one function to write data, for example: sram_read(OBJECT_IDENTIFIER) would return a pointer to the appriate object and
10
2062
by: goose | last post by:
Hello all I've written a wrapper for malloc and friends. Its available from http://www.lelanthran.com/downloads/os_mem/index.php The reason for doing writing this so that newbies can finally get answers to the following newbie questions:
18
2629
by: MajorSetback | last post by:
I am using the Redhat version of Linux and GNU C++. It is not clear to me whether this is a Linux issue or a C++ issue. I do not have this problem running the same program on Windows but tweaking the C++ code appears to fix the problem on Linux. I have a static array that is declared privately in one class and a structure that is declared publicly in another class. The program uses both classes. I was getting core dumps and traced...
17
9139
by: dtschoepe | last post by:
Hi, I have a homework project I am working on, so be forwarned, I'm new to C programming. But anyway, having some trouble with a memory allocation issue related to a char * that is a variable inside of a structure. I keep getting segmentation fault errors and I am having trouble understanding why. Here's the parts of the code in question... This is part of the .h file where the struct us defined...
3
2991
by: ranjeetasharma81 | last post by:
Hi all, I have a big C-cod, in which there are lots of dynamic memory allocation used. I want to replace dynamic memroy allocation by static arrays. The following are the problems that i am facing: 1- From structure and dynamic memory allocation point of view, the code is very complicated. The code has various “nested structures” with a number of levels. The size of memory allocated for pointer to structure or its pointer...
5
2675
by: Mahendra Kumar Kutare | last post by:
I am trying to implement a webserver with boss-worker model thread pool implementation - I have a header declaration threadpool.h as - typedef struct threadpool_work { void (*routine) (); void *arg; struct threadpool_work *next; } threadpool_work_t;
25
4714
by: Andreas Eibach | last post by:
Hi again, one of the other big woes I'm having... typedef struct perBlockStru /* (structure) Long words per block */ { unsigned long *lword; } lwperBlockStru_t;
0
8738
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8939
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6575
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5907
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3104
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 we have to send another system
2
2399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2036
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.