| | |
CLR Console application vs Win32 Console application
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2008
Posts: 11
Reputation:
Solved Threads: 0
I am using Visual Studio 2005.
Following two programs has the same code, just that one is CLR Console application and the other is Win32 Console application.
I set a break point at int i=1 for both program, for CLR Console application, and when run to the break point, in the local windows,
I have seen none of the value set for the array beans;but for Win32 Console application, the value has been set correctly.
What is the reason for this different?
====CLR Console application====
====CLR Console application End====
===Win32 Console application=====
===Win32 Console application End=====
This is what I see for CLR Console App when debugging
http://tinyurl.com/5jq4yb
This is what I see for Win32 Console App when debugging
http://tinyurl.com/69xzmb
I am using debug configuration, and
is what appeared in Projects>TestCLR Properties>Configuration Properties>Command Line
/Od /D "WIN32" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /FD /EHa /MDd /Yu"stdafx.h" /Fp"Debug\TestCLR.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Zi /clr /TP /errorReport:prompt /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"
under Active(Debug) configuration.
Following two programs has the same code, just that one is CLR Console application and the other is Win32 Console application.
I set a break point at int i=1 for both program, for CLR Console application, and when run to the break point, in the local windows,
I have seen none of the value set for the array beans;but for Win32 Console application, the value has been set correctly.
What is the reason for this different?
====CLR Console application====
C++ Syntax (Toggle Plain Text)
#include "stdafx.h" int main(array<System::String ^> ^args) { double beans[3][4]; beans[0][0] = 0; beans[0][1] = 1; beans[0][2] = 2; beans[0][3] = 3; beans[1][0] = 10; beans[1][1] = 11; beans[1][2] = 12; beans[1][3] = 13; beans[2][0] = 20; beans[2][1] = 21; beans[2][2] = 22; beans[2][3] = 23; double (*pbeans) [4] =beans; pbeans++; int i=1; }
===Win32 Console application=====
C++ Syntax (Toggle Plain Text)
int main(){ double beans[3][4]; beans[0][0] = 0; beans[0][1] = 1; beans[0][2] = 2; beans[0][3] = 3; beans[1][0] = 10; beans[1][1] = 11; beans[1][2] = 12; beans[1][3] = 13; beans[2][0] = 20; beans[2][1] = 21; beans[2][2] = 22; beans[2][3] = 23; double (*pbeans) [4] =beans; pbeans++; int i=1; }
This is what I see for CLR Console App when debugging
http://tinyurl.com/5jq4yb
This is what I see for Win32 Console App when debugging
http://tinyurl.com/69xzmb
I am using debug configuration, and
is what appeared in Projects>TestCLR Properties>Configuration Properties>Command Line
/Od /D "WIN32" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /FD /EHa /MDd /Yu"stdafx.h" /Fp"Debug\TestCLR.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /nologo /c /Zi /clr /TP /errorReport:prompt /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"
under Active(Debug) configuration.
Last edited by Ancient Dragon; Jul 5th, 2008 at 8:25 am. Reason: replaced quote with code tags
![]() |
Similar Threads
Other Threads in the C++ Forum
- Previous Thread: Pointers or not?
- Next Thread: Help with template queue
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






