473,405 Members | 2,272 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,405 software developers and data experts.

What does this code mean?

CL_ConsoleWindow console("Console");

Is this some c++ idiom or a macro? I know you can't tell without the
headers, but I want a quick explanation.
Jul 22 '05 #1
11 1781
Sier wrote:
CL_ConsoleWindow console("Console");

Is this some c++ idiom or a macro? I know you can't tell without the
headers, but I want a quick explanation.


Looks like it's declaring an object called 'console' with type
'CL_ConsoleWindow'. The constructor of that object is being
passed the const char* "Console".

Nothing odd there... Like you say, we could tell you more with headers.

Jacques.

Jul 22 '05 #2
Jacques Labuschagne <ja*****@clawshrimp.com> wrote on Wed, 07 Jan 2004
12:03:25 GMT in comp.lang.c++:
Looks like it's declaring an object called 'console' with type
'CL_ConsoleWindow'. The constructor of that object is being
passed the const char* "Console".


Yes, but doesn't it have a name? Sorry but I'm inexperienced with C++.
Jul 22 '05 #3
On 7 Jan 2004 12:37:51 GMT, Sier <no**********@somewhere.com> wrote:
Jacques Labuschagne <ja*****@clawshrimp.com> wrote on Wed, 07 Jan 2004
12:03:25 GMT in comp.lang.c++:
Looks like it's declaring an object called 'console' with type
'CL_ConsoleWindow'. The constructor of that object is being
passed the const char* "Console".


Yes, but doesn't it have a name? Sorry but I'm inexperienced with C++.


What doesn't have a name? The declared object (assuming the code is as
Jacques says) has the name console.

Tom

C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Jul 22 '05 #4
Sier wrote:
CL_ConsoleWindow console("Console");

Is this some c++ idiom or a macro? I know you can't tell without the
headers, but I want a quick explanation.

This is straight from the Clanlid Game SDK (http://www.clanlib.org)
- From the Examples:
// Create a console window for text-output if not available
CL_ConsoleWindow console("Debug Console");
Check out the documentation of the Clanlib package for more information
on what it does- but the comment really says it all. Hope this helps!

Seth

~ Let us linux ~
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 22 '05 #5
Sier wrote:
Jacques Labuschagne <ja*****@clawshrimp.com> wrote on Wed, 07 Jan 2004
12:03:25 GMT in comp.lang.c++:
Looks like it's declaring an object called 'console' with type
'CL_ConsoleWindow'. The constructor of that object is being
passed the const char* "Console".


Yes, but doesn't it have a name?


Read again:
Looks like it's declaring an object called 'console'...


Jul 22 '05 #6

"Sier" <no**********@somewhere.com> wrote in message
news:Xn***********************@130.133.1.4...
Jacques Labuschagne <ja*****@clawshrimp.com> wrote on Wed, 07 Jan 2004
12:03:25 GMT in comp.lang.c++:
Looks like it's declaring an object called 'console' with type
'CL_ConsoleWindow'. The constructor of that object is being
passed the const char* "Console".


Yes, but doesn't it have a name? Sorry but I'm inexperienced with C++.


If you are refering to the constructor name, it is the same as the class
name. This is the way an object is built at declaration time (the
constructor doesn't appear explicitly in the declaration).

Catalin
Jul 22 '05 #7
Sier <no**********@somewhere.com> wrote in message news:<Xn***********************@130.133.1.4>...
CL_ConsoleWindow console("Console");

Is this some c++ idiom or a macro? I know you can't tell without the
headers, but I want a quick explanation.


apparently this is a variable declaration:

it declares a variable named 'console' of type 'CL_ConsoleWindow' and
initializes it with the string "Console"

Dan
Jul 22 '05 #8
tom_usenet <to********@hotmail.com> wrote on Wed, 07 Jan 2004
13:04:05 GMT in comp.lang.c++:
Yes, but doesn't it have a name? Sorry but I'm inexperienced with
C++.


What doesn't have a name? The declared object (assuming the code
is as Jacques says) has the name console.


Duh. Sorry for the silly questions.
Jul 22 '05 #9
"Catalin Pitis" <ca********************@iquestint.com> wrote on Wed, 07
Jan 2004 13:21:08 GMT in comp.lang.c++:
This is the way an object is built at declaration time (the
constructor doesn't appear explicitly in the declaration).


That's what I had forgot from my little experience with c++. I plan to
work with this library and I wanted to be comfortable with the c++
syntax before I start working on a project.
Jul 22 '05 #10

"Sier" <no**********@somewhere.com> wrote in message
news:Xn***********************@130.133.1.4...
CL_ConsoleWindow console("Console");

Is this some c++ idiom or a macro? I know you can't tell without the
headers, but I want a quick explanation.


It's not a known C++ idiom or macro. It looks like Windows stuff to me.
Jul 22 '05 #11

"Catalin Pitis" <ca********************@iquestint.com> wrote in message
news:bt************@ID-153006.news.uni-berlin.de...

"Sier" <no**********@somewhere.com> wrote in message
news:Xn***********************@130.133.1.4...
Jacques Labuschagne <ja*****@clawshrimp.com> wrote on Wed, 07 Jan 2004
12:03:25 GMT in comp.lang.c++:
Looks like it's declaring an object called 'console' with type
'CL_ConsoleWindow'. The constructor of that object is being
passed the const char* "Console".


Yes, but doesn't it have a name? Sorry but I'm inexperienced with C++.


If you are refering to the constructor name, it is the same as the class
name.


No. Constructors do not have names. (12.1/1)

-Mike
Jul 22 '05 #12

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

Similar topics

220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
51
by: jacob navia | last post by:
I would like to add at the beginning of the C tutorial I am writing a short blurb about what "types" are. I came up with the following text. Please can you comment? Did I miss something? Is...
58
by: Larry David | last post by:
Ok, first of all, let's get the obvious stuff out of the way. I'm an idiot. So please indulge me for a moment. Consider it an act of "community service".... What does "64bit" mean to your friendly...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
16
by: utab | last post by:
Dear all, In programming terminology, what is a wrapper and where is it used? Regards
13
by: Protoman | last post by:
I'm getting an error: 10 C:\Dev-Cpp\Enigma.cpp no match for 'operator<' in 'i < (+cleartext)->std::basic_string<_CharT, _Traits, _Alloc>::end ()' Code: Enigma.hpp...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

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.