Click here to Skip to main content
15,891,607 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralProblem with HDCs Pin
Serge Lobko-Lobanovsky27-Apr-04 2:37
Serge Lobko-Lobanovsky27-Apr-04 2:37 
GeneralLinear Search Pin
buttons25-Apr-04 10:02
buttons25-Apr-04 10:02 
GeneralBuilding Managed C++ Web Services Pin
Antti Keskinen22-Apr-04 8:59
Antti Keskinen22-Apr-04 8:59 
GeneralRe: Building Managed C++ Web Services Pin
ian mariano25-Apr-04 14:11
ian mariano25-Apr-04 14:11 
GeneralC++ Files Pin
buttons22-Apr-04 3:44
buttons22-Apr-04 3:44 
GeneralRe: C++ Files Pin
mccoyn22-Apr-04 5:41
mccoyn22-Apr-04 5:41 
GeneralRe: C++ Files Pin
Phil Boyd22-Apr-04 6:25
Phil Boyd22-Apr-04 6:25 
GeneralRe: C++ Files Pin
Navin23-Apr-04 9:42
Navin23-Apr-04 9:42 
Yes, the char* name[9] area is the problem. When you assign stuff to it, you need to allocate memory. One way, as another suggested, is to use std::string instead of char *. You can also make these arrays constants. E.g.,

const char* name[9] =
{
  "Lexmark Z25",
  "HP4p",
  "HP5L",
  "HP6p",
  "Cannon2A",
  "Cannon3B",
  "Epson2",
  "Epson3",
  "Epson4A"
};


Note I added an item at the begining, this is beause if the array isn't 9 items, the compiler will complain. Arrays start at index 0, btw. (It also happens to be the printer I have. Big Grin | :-D )

You can use this same trick with the other arrays, for consistency, but for the strings, at least, it saves you the hassle of having to allocate memory and stuff.


Sometimes I feel like I'm a USB printer in a parallel universe.
GeneralInheritance of String class Pin
ra_sasi21-Apr-04 10:45
ra_sasi21-Apr-04 10:45 
GeneralRe: Inheritance of String class Pin
Phil Boyd22-Apr-04 6:26
Phil Boyd22-Apr-04 6:26 
GeneralRe: Inheritance of String class Pin
ra_sasi23-Apr-04 6:58
ra_sasi23-Apr-04 6:58 
GeneralEmbed C# controls in MFC dialogs/views Pin
rkvs20-Apr-04 7:49
rkvs20-Apr-04 7:49 
GeneralFailed in calling Manged Method from Unmanged code Pin
sanjay.attri20-Apr-04 1:33
sanjay.attri20-Apr-04 1:33 
GeneralTry to make a Manged project in C++ 2003 Pin
Harry200419-Apr-04 16:06
Harry200419-Apr-04 16:06 
GeneralLNK2022 metadata inconsistent Pin
mattknowles719-Apr-04 13:15
mattknowles719-Apr-04 13:15 
GeneralSystem.MemoryException Pin
BlackDice19-Apr-04 4:44
BlackDice19-Apr-04 4:44 
GeneralScaling drawings Pin
AnsGe19-Apr-04 3:08
AnsGe19-Apr-04 3:08 
Generaltimer in C++ Pin
Karthik Ram16-Apr-04 21:27
Karthik Ram16-Apr-04 21:27 
GeneralRe: timer in C++ Pin
Michael Mac17-Apr-04 4:02
Michael Mac17-Apr-04 4:02 
GeneralRe: timer in C++ Pin
Karthik Ram17-Apr-04 6:44
Karthik Ram17-Apr-04 6:44 
GeneralRe: timer in C++ Pin
Michael Mac17-Apr-04 22:40
Michael Mac17-Apr-04 22:40 
GeneralRe: timer in C++ Pin
dev_chandok29-Apr-04 22:21
dev_chandok29-Apr-04 22:21 
GeneralNeed urgent C++ help Pin
Psylo15-Apr-04 10:16
Psylo15-Apr-04 10:16 
GeneralRe: Need urgent C++ help Pin
Jitendra gangwar26-Apr-04 1:42
Jitendra gangwar26-Apr-04 1:42 
GeneralCombo box problem Pin
Martin McCready15-Apr-04 4:24
Martin McCready15-Apr-04 4:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.