Wrox Programmer Forums
|
Visual C++ 2005 For discussion of Visual C++ 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2008, 01:08 PM
hat hat is offline
Registered User
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Clr Error?

Please Point out any error if there in this CLR Console Program.
This is Simple addition program.
source code:
// Powe.cpp : main project file.

#include "stdafx.h"

using namespace System;

int main(array<System::String ^> ^args)
{
    int c = 0,a = 0,b = 0;
       Console::WriteLine(L"Enter two No.");
        a = Console::Read();
    b = Console::Read();
    c = a + b;
    Console::WriteLine(L"The Addition is {0}",c);
    return 0;
}

The Program Compiles and also executes properly.
But the addition is not performed as Expected.

The lines that appear on the console are:

Enter two No.
4 5
The Addition is 84

so,why such a error.
It should come 9.
so,Please help me to get out of this situation and also give me the
error-free source code of this Simple CLR addition program




pranav





Similar Threads
Thread Thread Starter Forum Replies Last Post
version of CLR yugi9966 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 December 3rd, 2008 06:11 AM
.NET 3.5 CLR Vx General .NET 0 July 21st, 2007 02:50 PM
[V/S 2005] [CLR Error] manju.cdtech Visual Studio 2005 0 March 15th, 2007 12:04 AM
Unable to load the CLR hoavm .NET Framework 2.0 0 December 1st, 2006 06:22 PM
CLR Integration timstspry BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 0 October 13th, 2006 11:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.