473,626 Members | 3,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MC++ and native jagged Array

Hi guys!

I'm fairly new to managed C++, so I hope someone can help me.

I've got a Problem with the native C++ types. What I did is using an jagged
array of double in my managed app.

The code looks like this:

double** arr = new double*[1000];
for(int i=0; i<1000; i++)
arr[i] = new double[1000];

In a new console app there was no error if I tried to compile it.

Now I wanted to use this code in a new library project witch i startet.
But in this time the compiler gave my the following errormessage:
MC++ClassLibrar y error LNK2001: Nichtaufgelöste s externes Symbol "void *
__cdecl operator new(unsigned int)"

This means something like: Not dispersed external symbol "void * __cdecl
operator new(unsigned int)"

It would help me verry much if someone of you could give me a hint.

In my opinion there is a problem with the sign "new". Maybe I have to
include a library.

Thanx, Jannis
Nov 17 '05 #1
1 1321
I did it on my own... Thanx anyway....

I aded a Link to the "msvcrt.lib " library...

"Jannis Linxweiler" <J.**********@g mx.de> schrieb im Newsbeitrag
news:eq******** ******@tk2msftn gp13.phx.gbl...
Hi guys!

I'm fairly new to managed C++, so I hope someone can help me.

I've got a Problem with the native C++ types. What I did is using an jagged array of double in my managed app.

The code looks like this:

double** arr = new double*[1000];
for(int i=0; i<1000; i++)
arr[i] = new double[1000];

In a new console app there was no error if I tried to compile it.

Now I wanted to use this code in a new library project witch i startet.
But in this time the compiler gave my the following errormessage:
MC++ClassLibrar y error LNK2001: Nichtaufgelöste s externes Symbol "void *
__cdecl operator new(unsigned int)"

This means something like: Not dispersed external symbol "void * __cdecl
operator new(unsigned int)"

It would help me verry much if someone of you could give me a hint.

In my opinion there is a problem with the sign "new". Maybe I have to
include a library.

Thanx, Jannis

Nov 17 '05 #2

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

Similar topics

8
4502
by: Ted Miller | last post by:
Hi folks, I'm looking at moving a large base of C++ code to .Net under tight time constraints. The code runs in mission-critical environments, and I am extremely concerned about the loader lock problem and the potential for deadlocks. After pouring over the available information, and trying a few experiments, I am still left with a few questions and issues I hope someone out there can shed some light on.
1
2720
by: James dean | last post by:
I done a test and i really do not know the reason why a jagged array who has the same number of elements as a multidimensional array is faster here is my test. I assign a value and do a small calculation. Even if i initialise the jagged array inside the function it is still much faster. Are these results correct?. If i put the initialisation loop in the constructor its ridiculously faster but even here its 4 times faster...is this correct?...
0
1464
by: Eric Twietmeyer | last post by:
Hello, Am I mistaken in thinking that if I have a mc++ dll that I should be able to link against it (so long as it has exported symbols via declspec(dllexport)) in an unmanaged application? I am currently testing this and it fails. I have a native, unmanaged test application that links against my mc++ dll with a function entry point. Linking works fine, no errors. When I try to run in the debugger I see the output below (abreviated...
1
10287
by: xllx.relient.xllx | last post by:
Hi, I have two questions: 1.)Is it true that an rectangular array is really just an single dimensional array that lets itself be treated as a multi-dimensional array? For example the following declaration: int rectangular = new int;
8
2197
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the existing code. The options I've considered so far: 1. Create a new MC++ GUI project and add the *.c files to them and mark them with pragma unamanged. However, the /clr option does not compile *.c files, so I rename them to *.cpp, and now they...
2
3962
by: tiberiu.motoc | last post by:
Hi. I've asked this question on the MSDN forums, but I've had no replies. I'm really stuck, so I'm gonna try my luck here. I have a Java web service which contains a simple function; the function returns a double-dimensional array of integers. I ran the wsdl utility and I created a simple .NET web client which calls the function. I noticed that the result is returned as a jagged array, since multi-dimensional arrays cannot be...
5
10339
by: TS | last post by:
is there some code somewhere that does this? i have a jagged array that is not jagged, it has an equal number of rows and columns in each array so it should convert but want to get the code to do it somewhere. thanks
17
7239
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hi Gurus, I need to transfer a jagged array of byte by reference to unmanaged function, The unmanaged code should changed the values of the array, and when the unmanaged function returns I need to show the array data to the end user. Can I do that? How?
3
6099
by: pinkfloydfan | last post by:
Hi there I have a C# program that produces a lot of data that I currently store in a jagged array and I have a couple of questions that I was hoping someone might shed some light on for me please: 1) If the data is stored in MyData is there a way to do a query on the jagged array to get out say all the 100th entries of the 250,000 main arrays or am I better off with a for loop? 2) Do you have a better suggestion of how to store the...
0
8269
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...
0
8711
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8368
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
7203
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
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
5576
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
4094
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4206
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1515
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.