473,396 Members | 2,033 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,396 software developers and data experts.

what's wrong with this !

I am making a managed C++ wrapper for calling legacy C++ code from C#.
I don't understand what's wrong with following code :

__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);
....
}

__gc public class TrspPortManaged
{
public:
static const short NbSerialBuffers = 128;
TrspPortManaged ();
....

private:
SerialBuffer *_buffers [];
UMTrspPort __nogc *_unmanaged;
....
}

....

TrspPortManaged::TrspPortManaged ()
{
_unmanaged = new UMTrspPort ();

_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
....
}

In TrspPortManaged constructor, the first iteration in for loop seems OK
(sb _buffer var = 0x07253240, keep the same value in _buffers [0])
The second iteration (i = 2), sb _buffer var = 0x07256ee8, buffer [1]->
_buffer = 0x00000000

What am I doing wrong ?

Thanks in advance for your help.

Droopy.

Nov 17 '05 #1
8 1623
Please help me
Droopy <dr**************@hotmail.com> wrote in
news:Xn*********************************@195.129.1 10.71:
I am making a managed C++ wrapper for calling legacy C++ code from C#.
I don't understand what's wrong with following code :

__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);
...
}

__gc public class TrspPortManaged
{
public:
static const short NbSerialBuffers = 128;
TrspPortManaged ();
...

private:
SerialBuffer *_buffers [];
UMTrspPort __nogc *_unmanaged;
...
}

...

TrspPortManaged::TrspPortManaged ()
{
_unmanaged = new UMTrspPort ();

_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
...
}

In TrspPortManaged constructor, the first iteration in for loop seems OK (sb _buffer var = 0x07253240, keep the same value in _buffers [0])
The second iteration (i = 2), sb _buffer var = 0x07256ee8, buffer [1]->
_buffer = 0x00000000

What am I doing wrong ?

Thanks in advance for your help.

Droopy.


Nov 17 '05 #2
Hi Droopy!
I am making a managed C++ wrapper for calling legacy C++ code from C#.
I don't understand what's wrong with following code :
What error do you get?
Can you provide a small, complete repro-code?

TrspPortManaged::TrspPortManaged ()
{
_unmanaged = new UMTrspPort ();

_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}


I canīt see anything bad...

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #3
"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in
news:uU**************@TK2MSFTNGP12.phx.gbl:
Hi Droopy!
I am making a managed C++ wrapper for calling legacy C++ code from C#.
I don't understand what's wrong with following code :


What error do you get?
Can you provide a small, complete repro-code?

I canīt see anything bad...


OK, here it is a sample complete code that illustrate the problem :

1) IprWrapper.h + IprWrapper.cpp in a C++ dll project

// IprWrapper.h

#pragma once

using namespace System;

namespace IprWrapper
{
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);

__property bool get_IsUsed ()
{
return _isUsed;
}

__property void set_IsUsed (bool value)
{
_isUsed = value;
}

__property short get_BufferNumber ()
{
return _bufferNr;
}

__property void set_BufferNumber (short value)
{
_bufferNr = value;
}
};

//----- class TrspPortManaged -----------

__gc public class TrspPortManaged
{
public:
static const short BufferSize = 16;
static const short NbSerialBuffers = 128;

TrspPortManaged ();

private:
SerialBuffer *_buffers [];
};
}

// IprWrapper.cpp

#include "stdafx.h"

#include "IprWrapper.h"

namespace IprWrapper
{

TrspPortManaged::TrspPortManaged ()
{
_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}

// SerialBuffer class

SerialBuffer::SerialBuffer (short bufferNr)
{
_buffer = new unsigned char [TrspPortManaged::BufferSize];
IsUsed = false;
_length = 0;
BufferNumber = bufferNr;
}
}

2) A simple C# windows application, using the C++ dll (project reference)

private void Form1_Load(object sender, System.EventArgs e)
{
IprWrapper.TrspPortManaged transport = new IprWrapper.TrspPortManaged ();
}

The problem is that, in the TrspPortManaged constructor, in the for loop,
sb->_buffer is changed (from 0x07512d40 to 0x00000000) when the following
line is executed :
_buffers [i - 1] = sb;

Usually, the first iteration works, the second fails.

Thanks in advance for your help.

Droopy.
Nov 17 '05 #4

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in
news:uU**************@TK2MSFTNGP12.phx.gbl:
Hi Droopy!
I am making a managed C++ wrapper for calling legacy C++ code from C#.
I don't understand what's wrong with following code :


What error do you get?
Can you provide a small, complete repro-code?

I canīt see anything bad...


OK, here it is a sample complete code that illustrate the problem :

1) IprWrapper.h + IprWrapper.cpp in a C++ dll project

// IprWrapper.h

#pragma once

using namespace System;

namespace IprWrapper
{
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);

__property bool get_IsUsed ()
{
return _isUsed;
}

__property void set_IsUsed (bool value)
{
_isUsed = value;
}

__property short get_BufferNumber ()
{
return _bufferNr;
}

__property void set_BufferNumber (short value)
{
_bufferNr = value;
}
};

//----- class TrspPortManaged -----------

__gc public class TrspPortManaged
{
public:
static const short BufferSize = 16;
static const short NbSerialBuffers = 128;

TrspPortManaged ();

private:
SerialBuffer *_buffers [];
};
}

// IprWrapper.cpp

#include "stdafx.h"

#include "IprWrapper.h"

namespace IprWrapper
{

TrspPortManaged::TrspPortManaged ()
{
_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}

// SerialBuffer class

SerialBuffer::SerialBuffer (short bufferNr)
{
_buffer = new unsigned char [TrspPortManaged::BufferSize];
IsUsed = false;
_length = 0;
BufferNumber = bufferNr;
}
}

2) A simple C# windows application, using the C++ dll (project reference)

private void Form1_Load(object sender, System.EventArgs e)
{
IprWrapper.TrspPortManaged transport = new IprWrapper.TrspPortManaged ();
}

The problem is that, in the TrspPortManaged constructor, in the for loop,
sb->_buffer is changed (from 0x07512d40 to 0x00000000) when the following
line is executed :
_buffers [i - 1] = sb;

Usually, the first iteration works, the second fails.

Thanks in advance for your help.

Droopy.


Works for me, don't know how you are looking at the sb->_buffer pointer but
all of them are correctly set when I run your code.

Willy.
Nov 17 '05 #5
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:#X**************@TK2MSFTNGP09.phx.gbl:

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in
news:uU**************@TK2MSFTNGP12.phx.gbl:
Hi Droopy!
I am making a managed C++ wrapper for calling legacy C++ code from
C#. I don't understand what's wrong with following code :

What error do you get?
Can you provide a small, complete repro-code?

I canīt see anything bad...


OK, here it is a sample complete code that illustrate the problem :

1) IprWrapper.h + IprWrapper.cpp in a C++ dll project

// IprWrapper.h

#pragma once

using namespace System;

namespace IprWrapper
{
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);

__property bool get_IsUsed ()
{
return _isUsed;
}

__property void set_IsUsed (bool value)
{
_isUsed = value;
}

__property short get_BufferNumber ()
{
return _bufferNr;
}

__property void set_BufferNumber (short value)
{
_bufferNr = value;
}
};

//----- class TrspPortManaged -----------

__gc public class TrspPortManaged
{
public:
static const short BufferSize = 16;
static const short NbSerialBuffers = 128;

TrspPortManaged ();

private:
SerialBuffer *_buffers [];
};
}

// IprWrapper.cpp

#include "stdafx.h"

#include "IprWrapper.h"

namespace IprWrapper
{

TrspPortManaged::TrspPortManaged ()
{
_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}

// SerialBuffer class

SerialBuffer::SerialBuffer (short bufferNr)
{
_buffer = new unsigned char [TrspPortManaged::BufferSize];
IsUsed = false;
_length = 0;
BufferNumber = bufferNr;
}
}

2) A simple C# windows application, using the C++ dll (project
reference)

private void Form1_Load(object sender, System.EventArgs e)
{
IprWrapper.TrspPortManaged transport = new
IprWrapper.TrspPortManaged ();
}

The problem is that, in the TrspPortManaged constructor, in the for
loop, sb->_buffer is changed (from 0x07512d40 to 0x00000000) when
the following line is executed :
_buffers [i - 1] = sb;

Usually, the first iteration works, the second fails.

Thanks in advance for your help.

Droopy.


Works for me, don't know how you are looking at the sb->_buffer
pointer but all of them are correctly set when I run your code.

Willy.


I just added _buffers in Watch list.
But you are wright, if I make more iterations in the for loop, the _buffer
value is updated with some "delay".
For example, before I execute iteration 10, _buffer = 0x00000000 for all
_buffer in _buffers array with index > 3 (I mean from _buffers [3] to
_buffers [9]).
After the execution of iteration 10, _buffers [3] is updated with a value !
= 0x00000000 !

May be it is the way the Watch window is working.

So I just added a Dump function called just after the TrspPortManaged
constructor.
At that time, all _buffer pointer are set but from item #27 to item #127,
they all have the same value = 0x00936528 !

Thanks for your help.

Droopy.
Nov 17 '05 #6
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:#X**************@TK2MSFTNGP09.phx.gbl:

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in
news:uU**************@TK2MSFTNGP12.phx.gbl:
Hi Droopy!
I am making a managed C++ wrapper for calling legacy C++ code from
C#. I don't understand what's wrong with following code :

What error do you get?
Can you provide a small, complete repro-code?

I canīt see anything bad...


OK, here it is a sample complete code that illustrate the problem :

1) IprWrapper.h + IprWrapper.cpp in a C++ dll project

// IprWrapper.h

#pragma once

using namespace System;

namespace IprWrapper
{
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);

__property bool get_IsUsed ()
{
return _isUsed;
}

__property void set_IsUsed (bool value)
{
_isUsed = value;
}

__property short get_BufferNumber ()
{
return _bufferNr;
}

__property void set_BufferNumber (short value)
{
_bufferNr = value;
}
};

//----- class TrspPortManaged -----------

__gc public class TrspPortManaged
{
public:
static const short BufferSize = 16;
static const short NbSerialBuffers = 128;

TrspPortManaged ();

private:
SerialBuffer *_buffers [];
};
}

// IprWrapper.cpp

#include "stdafx.h"

#include "IprWrapper.h"

namespace IprWrapper
{

TrspPortManaged::TrspPortManaged ()
{
_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}

// SerialBuffer class

SerialBuffer::SerialBuffer (short bufferNr)
{
_buffer = new unsigned char [TrspPortManaged::BufferSize];
IsUsed = false;
_length = 0;
BufferNumber = bufferNr;
}
}

2) A simple C# windows application, using the C++ dll (project
reference)

private void Form1_Load(object sender, System.EventArgs e)
{
IprWrapper.TrspPortManaged transport = new
IprWrapper.TrspPortManaged ();
}

The problem is that, in the TrspPortManaged constructor, in the for
loop, sb->_buffer is changed (from 0x07512d40 to 0x00000000) when
the following line is executed :
_buffers [i - 1] = sb;

Usually, the first iteration works, the second fails.

Thanks in advance for your help.

Droopy.


Works for me, don't know how you are looking at the sb->_buffer
pointer but all of them are correctly set when I run your code.

Willy.


I just added _buffers in Watch list.
But you are wright, if I make more iterations in the for loop, the _buffer
value is updated with some "delay".
For example, before I execute iteration 10, _buffer = 0x00000000 for all
_buffer in _buffers array with index > 3 (I mean from _buffers [3] to
_buffers [9]).
After the execution of iteration 10, _buffers [3] is updated with a value !
= 0x00000000 !

May be it is the way the Watch window is working.

So I just added a Dump function called just after the TrspPortManaged
constructor.
At that time, all _buffer pointer are set but from item #27 to item #127,
they all have the same value = 0x00936528 !

Thanks for your help.

Droopy.
Nov 17 '05 #7
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:#X**************@TK2MSFTNGP09.phx.gbl:

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in
news:uU**************@TK2MSFTNGP12.phx.gbl:

Hi Droopy!
> I am making a managed C++ wrapper for calling legacy C++ code from
> C#. I don't understand what's wrong with following code :

What error do you get?
Can you provide a small, complete repro-code?

I canīt see anything bad...
OK, here it is a sample complete code that illustrate the problem :

1) IprWrapper.h + IprWrapper.cpp in a C++ dll project

// IprWrapper.h

#pragma once

using namespace System;

namespace IprWrapper
{
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);

__property bool get_IsUsed ()
{
return _isUsed;
}

__property void set_IsUsed (bool value)
{
_isUsed = value;
}

__property short get_BufferNumber ()
{
return _bufferNr;
}

__property void set_BufferNumber (short value)
{
_bufferNr = value;
}
};

//----- class TrspPortManaged -----------

__gc public class TrspPortManaged
{
public:
static const short BufferSize = 16;
static const short NbSerialBuffers = 128;

TrspPortManaged ();

private:
SerialBuffer *_buffers [];
};
}

// IprWrapper.cpp

#include "stdafx.h"

#include "IprWrapper.h"

namespace IprWrapper
{

TrspPortManaged::TrspPortManaged ()
{
_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}

// SerialBuffer class

SerialBuffer::SerialBuffer (short bufferNr)
{
_buffer = new unsigned char [TrspPortManaged::BufferSize];
IsUsed = false;
_length = 0;
BufferNumber = bufferNr;
}
}

2) A simple C# windows application, using the C++ dll (project
reference)

private void Form1_Load(object sender, System.EventArgs e)
{
IprWrapper.TrspPortManaged transport = new
IprWrapper.TrspPortManaged ();
}

The problem is that, in the TrspPortManaged constructor, in the for
loop, sb->_buffer is changed (from 0x07512d40 to 0x00000000) when
the following line is executed :
_buffers [i - 1] = sb;

Usually, the first iteration works, the second fails.

Thanks in advance for your help.

Droopy.


Works for me, don't know how you are looking at the sb->_buffer
pointer but all of them are correctly set when I run your code.

Willy.


I just added _buffers in Watch list.
But you are wright, if I make more iterations in the for loop, the
_buffer value is updated with some "delay".
For example, before I execute iteration 10, _buffer = 0x00000000 for
all _buffer in _buffers array with index > 3 (I mean from _buffers [3]
to _buffers [9]).
After the execution of iteration 10, _buffers [3] is updated with a
value ! = 0x00000000 !

May be it is the way the Watch window is working.

So I just added a Dump function called just after the TrspPortManaged
constructor.
At that time, all _buffer pointer are set but from item #27 to item
#127, they all have the same value = 0x00936528 !

Thanks for your help.

Droopy.


I changed some project options and all pointers seem OK now.
I enabled the "Enable Unmanaged Debugging" property from the Windows
application (in Configuration Properties->Debugging).
It reports memory leaks.
There is something I am missing here because I use managed C++.
What should I "delete" or "dispose" ?

Thanks in advance,

Droopy.
Nov 17 '05 #8
Droopy <dr**************@hotmail.com> wrote in
news:Xn**********************************@195.129. 110.71:
"Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
news:#X**************@TK2MSFTNGP09.phx.gbl:

"Droopy" <dr**************@hotmail.com> wrote in message
news:Xn**********************************@195.129. 110.71...
"Jochen Kalmbach [MVP]" <no********************@holzma.de> wrote in
news:uU**************@TK2MSFTNGP12.phx.gbl:

Hi Droopy!
> I am making a managed C++ wrapper for calling legacy C++ code from
> C#. I don't understand what's wrong with following code :

What error do you get?
Can you provide a small, complete repro-code?

I canīt see anything bad...
OK, here it is a sample complete code that illustrate the problem :

1) IprWrapper.h + IprWrapper.cpp in a C++ dll project

// IprWrapper.h

#pragma once

using namespace System;

namespace IprWrapper
{
#pragma once

using namespace System;
using namespace System::Runtime::InteropServices;
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;

public:

SerialBuffer (short bufferNr);

__property bool get_IsUsed ()
{
return _isUsed;
}

__property void set_IsUsed (bool value)
{
_isUsed = value;
}

__property short get_BufferNumber ()
{
return _bufferNr;
}

__property void set_BufferNumber (short value)
{
_bufferNr = value;
}
};

//----- class TrspPortManaged -----------

__gc public class TrspPortManaged
{
public:
static const short BufferSize = 16;
static const short NbSerialBuffers = 128;

TrspPortManaged ();

private:
SerialBuffer *_buffers [];
};
}

// IprWrapper.cpp

#include "stdafx.h"

#include "IprWrapper.h"

namespace IprWrapper
{

TrspPortManaged::TrspPortManaged ()
{
_buffers = new SerialBuffer *[NbSerialBuffers];
SerialBuffer *sb;
for (int i = 1; i <= NbSerialBuffers; i++)
{
sb = new SerialBuffer (i);
_buffers [i - 1] = sb;
}
}

// SerialBuffer class

SerialBuffer::SerialBuffer (short bufferNr)
{
_buffer = new unsigned char [TrspPortManaged::BufferSize];
IsUsed = false;
_length = 0;
BufferNumber = bufferNr;
}
}

2) A simple C# windows application, using the C++ dll (project
reference)

private void Form1_Load(object sender, System.EventArgs e)
{
IprWrapper.TrspPortManaged transport = new
IprWrapper.TrspPortManaged ();
}

The problem is that, in the TrspPortManaged constructor, in the for
loop, sb->_buffer is changed (from 0x07512d40 to 0x00000000) when
the following line is executed :
_buffers [i - 1] = sb;

Usually, the first iteration works, the second fails.

Thanks in advance for your help.

Droopy.


Works for me, don't know how you are looking at the sb->_buffer
pointer but all of them are correctly set when I run your code.

Willy.


I just added _buffers in Watch list.
But you are wright, if I make more iterations in the for loop, the
_buffer value is updated with some "delay".
For example, before I execute iteration 10, _buffer = 0x00000000 for
all _buffer in _buffers array with index > 3 (I mean from _buffers [3]
to _buffers [9]).
After the execution of iteration 10, _buffers [3] is updated with a
value ! = 0x00000000 !

May be it is the way the Watch window is working.

So I just added a Dump function called just after the TrspPortManaged
constructor.
At that time, all _buffer pointer are set but from item #27 to item
#127, they all have the same value = 0x00936528 !

Thanks for your help.

Droopy.


I changed some project options and all pointers seem OK now.
I enabled the "Enable Unmanaged Debugging" property from the Windows
application (in Configuration Properties->Debugging).
It reports memory leaks.
There is something I am missing here because I use managed C++.
What should I "delete" or "dispose" ?

Thanks in advance,

Droopy.
Nov 17 '05 #9

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

Similar topics

3
by: Mike Henley | last post by:
I first came across rebol a while ago; it seemed interesting but then i was put off by its proprietary nature, although the core of the language is a free download. Recently however, i can't...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
28
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr();...
9
by: Pyenos | last post by:
import cPickle, shelve could someone tell me what things are wrong with my code? class progress: PROGRESS_TABLE_ACTIONS= DEFAULT_PROGRESS_DATA_FILE="progress_data" PROGRESS_OUTCOMES=
3
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when...
89
by: Tubular Technician | last post by:
Hello, World! Reading this group for some time I came to the conclusion that people here are split into several fractions regarding size_t, including, but not limited to, * size_t is the...
20
by: Daniel.C | last post by:
Hello. I just copied this code from my book with no modification : #include <stdio.h> /* count characters in input; 1st version */ main() { long nc; nc = 0;
24
by: MU | last post by:
Hello I have some code that sets a dropdownlist control with a parameter from the querystring. However, when the querystring is empty, I get an error. Here is my code: Protected Sub...
2
by: mingke | last post by:
Hi... So I have problem with my if condition..I don't know what's wrong but it keeps resulting the wrong answer.... So here's the part of my code I have problem with: for (i=0; i<size2;...
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...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...

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.