Click here to Skip to main content
16,005,124 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionCString to String Pin
vibindia13-Nov-07 21:15
vibindia13-Nov-07 21:15 
AnswerRe: CString to String Pin
Christian Graus13-Nov-07 22:06
protectorChristian Graus13-Nov-07 22:06 
AnswerRe: CString to String Pin
Mark Salsbery14-Nov-07 5:50
Mark Salsbery14-Nov-07 5:50 
JokeRe: CString to String Pin
Luc Pattyn14-Nov-07 5:55
sitebuilderLuc Pattyn14-Nov-07 5:55 
GeneralRe: CString to String Pin
Mark Salsbery14-Nov-07 5:59
Mark Salsbery14-Nov-07 5:59 
QuestionConflict with enum in struct Pin
kim hk13-Nov-07 20:27
kim hk13-Nov-07 20:27 
AnswerRe: Conflict with enum in struct Pin
George L. Jackson15-Nov-07 13:05
George L. Jackson15-Nov-07 13:05 
Questionneed help with array in C Pin
ndtoan1313-Nov-07 15:37
ndtoan1313-Nov-07 15:37 
I always get y_num=0 when a=16 and b=256 (I want y_num=65536)

Please help.
<br />
#include <stdio.h><br />
#include <stdlib.h><br />
#include <string.h><br />
#include <time.h><br />
#include <math.h><br />
<br />
typedef unsigned int WORD;<br />
typedef WORD* WORDPTR;<br />
<br />
WORDPTR *S;<br />
WORDPTR  D;<br />
<br />
WORD x_num;<br />
WORD y_num;<br />
<br />
WORD a;<br />
WORD b;<br />
WORD i, j;<br />
int main()<br />
{<br />
    puts("------------------ Start --------------------");<br />
    puts("");<br />
<br />
    a = 0;<br />
    printf("Enter a = ");<br />
    scanf("%u", &a);<br />
<br />
<br />
    b = 0;<br />
    printf("Enter b = ");<br />
    scanf("%u", &b);<br />
<br />
    x_num = 1 << a;<br />
    y_num  = 1 << b;<br />
<br />
    S = (WORDPTR *)malloc(x_num*sizeof(WORDPTR));<br />
    if (S == NULL)<br />
    {<br />
		puts("Error 1!");<br />
		return 1;<br />
    }<br />
    for (i = 0; i < x_num; i++)<br />
    {<br />
	S[i] = (WORDPTR)malloc(y_num*sizeof(WORD));<br />
	if (S[i] == NULL)<br />
	{<br />
	    puts("Error 2!");<br />
	    return 1;<br />
	}<br />
    }<br />
<br />
    D = (WORDPTR)malloc(y_num*sizeof(WORD));<br />
    if (D == NULL)<br />
    {<br />
		puts("Error 3!");<br />
		return 1;<br />
    }<br />
    puts("OK!");<br />
<br />
    return (0);<br />
}


My favorite site:
Vietnam Trading Information
Tour au Vietnam
AnswerRe: need help with array in C Pin
Christian Graus13-Nov-07 15:46
protectorChristian Graus13-Nov-07 15:46 
AnswerRe: need help with array in C Pin
Jude Deng13-Nov-07 15:52
Jude Deng13-Nov-07 15:52 
GeneralRe: need help with array in C Pin
ndtoan1313-Nov-07 20:33
ndtoan1313-Nov-07 20:33 
GeneralRe: need help with array in C Pin
Christian Graus13-Nov-07 22:08
protectorChristian Graus13-Nov-07 22:08 
QuestionHow to take control of TCP/IP in our hands? Pin
AlwaysStudent12-Nov-07 23:04
AlwaysStudent12-Nov-07 23:04 
AnswerRe: How to take control of TCP/IP in our hands? Pin
led mike13-Nov-07 4:42
led mike13-Nov-07 4:42 
GeneralRe: How to take control of TCP/IP in our hands? Pin
AlwaysStudent13-Nov-07 17:29
AlwaysStudent13-Nov-07 17:29 
QuestionHow to mount any file? Pin
bhaskar jatav12-Nov-07 17:37
bhaskar jatav12-Nov-07 17:37 
AnswerRe: How to mount any file? Pin
Christian Graus12-Nov-07 17:57
protectorChristian Graus12-Nov-07 17:57 
GeneralRe: How to mount any file? Pin
bhaskar jatav13-Nov-07 20:32
bhaskar jatav13-Nov-07 20:32 
GeneralRe: How to mount any file? Pin
Christian Graus13-Nov-07 22:09
protectorChristian Graus13-Nov-07 22:09 
QuestionHow to Create virtual drive? Pin
bhaskar jatav12-Nov-07 17:34
bhaskar jatav12-Nov-07 17:34 
GeneralRe: How to Create virtual drive? Pin
earlgraham4-Jan-08 7:17
earlgraham4-Jan-08 7:17 
QuestionDouble::TryParse() Pin
UnHolyKnight55512-Nov-07 4:38
UnHolyKnight55512-Nov-07 4:38 
AnswerRe: Double::TryParse() [modified] Pin
Luc Pattyn12-Nov-07 5:05
sitebuilderLuc Pattyn12-Nov-07 5:05 
GeneralRe: Double::TryParse() [modified] Pin
UnHolyKnight55512-Nov-07 6:45
UnHolyKnight55512-Nov-07 6:45 
GeneralRe: Double::TryParse() Pin
Luc Pattyn12-Nov-07 7:16
sitebuilderLuc Pattyn12-Nov-07 7:16 

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.