473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Error in reading Console

Hi,

I am trying to use a old written code by one of my senior, It is a console
application to append two files. I need to make some necessary changes in
the application, but when I try to write Console::ReadLine(), its throwing
some error

d:\Projects\myappend\append.cpp(252): error C2653: 'console' : is not a
class or namespace name,

I don't know what is wrong in this and why such errors are occurring in the
code.

Please help me, which library I need to use? if there are any changes in
project properties then please let me know.

Thanks a lot
Amrro
Nov 17 '05 #1
2 1328
Amrro wrote:
Hi,

I am trying to use a old written code by one of my senior, It is a
console application to append two files. I need to make some
necessary changes in the application, but when I try to write
Console::ReadLine(), its throwing some error

d:\Projects\myappend\append.cpp(252): error C2653: 'console' : is not
a class or namespace name,

I don't know what is wrong in this and why such errors are occurring
in the code.

Please help me, which library I need to use? if there are any changes
in project properties then please let me know.


It sounds like you're trying to use .NET classes in a native (unmanaged) C
or C++ application. How does the existing code write to the console? Look
for calls to printf(), fprintf(), puts(), fputs(), or use of the C++ object
cout or cerr (or std::cout or std::cerr).

If the original code is unmanaged, you're probably better off making your
changes unmanaged as well rather than trying to bolt on some managed code
for a minor modification.

-cd
Nov 17 '05 #2
> I am trying to use a old written code by one of my senior, It is a console
application to append two files. I need to make some necessary changes in
the application, but when I try to write Console::ReadLine(), its throwing
some error

d:\Projects\myappend\append.cpp(252): error C2653: 'console' : is not a
class or namespace name,

I don't know what is wrong in this and why such errors are occurring in the code.

Please help me, which library I need to use? if there are any changes in
project properties then please let me know.


Check a case please. Not a 'console', but 'Console'.
Make sure you have 'using System;' statement at the top.
--
Vladimir Nesterovsky
e-mail: vl******@nesterovsky-bros.com
home: http://www.nesterovsky-bros.com
Nov 17 '05 #3

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

Similar topics

1
by: Scott Shaw | last post by:
Hi all, I was wondering if you could help out with this problem that I am having. What I am trying to do is detect keyboard input in a while loop without halting/pausing the loop until the key is...
4
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from...
0
by: David Moore | last post by:
Hello I posted a thread about this a while back, but I can't actually find it again so I can reply to it with the solution I found, so I'm making a new thread and hoping it goes to the top of...
20
by: TTroy | last post by:
Hello, I have found some peculiar behaviour in the fgets runtime library function for my compiler/OS/platform (Dev C++/XP/P4) - making a C console program (which runs in a CMD.exe shell). The...
2
by: John Salerno | last post by:
I wrote this code just to experiment with writing to and reading from a file. It seems to work fine when writing, but when reading the file, it only prints the filepath to the screen, not the file...
8
by: Kevin D. | last post by:
Please note, I already posted this on the MySQL official forum, but received no response. I thought I'd try again in another location. My apologies to anyone reading this twice... Despite...
9
by: Macca | last post by:
Hi, I have a synchronous socket server which my app uses to read data from clients. To test this I have a simulated client that sends 100 byte packets. I have set up the socket server so...
2
by: nexus024 | last post by:
I am writing a program for one of my C++ classes at school and have gotten an error that I can't debug. What I am trying to do is write a C++ program that parses an XML file and displays to console...
2
by: jimmy | last post by:
Hi, I have an XML string that has been returned using a WebRequest object that i now need extract some data from. Some sample data is shown below. <?xml version="1.0" encoding="UTF-8"?>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.