C++ Programming Resource

In a message dated 1/14/00 11:46:42 AM Eastern Standard Time,
[email protected] writes:
> Steve Cliff wrote:
> >Much of the bad mouthing that the Microsoft Foundation Classes gets
> >comes from folks who are not using the provided objects in a robust
> >object oriented system design and who may not fully understand object
> >oriented analysis and design. Of course, anther large segment of the
> >bad mouthing that the Microsoft Foundation Classes gets comes from
> >folks who *DO* understand object oriented design and find the classes,
> >--- uh, how shall I say it, --- "less than optimal"

> And then there's the people who just plain hate Microsoft for being
> Microsoft and will bad mouth just about anything with the Microsoft logo.
> (I'm not accusing anyone of being this way, just a general statement - no
> flamefest, please...)

I'm just catching up on my mail so sorry if I'm a little late in the reply.

I just recently have lept into the waters of C++, Visual C++, MFC, Windows CE after having my
prior C-level programming in the 80's, practically before function prototyping.

One of the headaches of MFC is that if you aren't familiar with Windows operation in general and
the API that is encapsulated in the MFC classes, it is a major fog and is quite a humbling experience for someone who is used to catching on to things "like that! <finger snap>"

On the other hand, if you've been doing windows programming in C, then C++, then C++ with MFC, then Visual C++ with its Wizards, programming IS orders of magnitudes quicker, easier, and robust for most "vanilla" projects.

That being said, if you require capabilities that are not in the framework models, well, things get more difficult.

More later...
 
Well, in earnest I understand your logic either.

The Win32 API, is for commercial reasons often very poorly documented and some of its functionality is unpublished.

As on Open Systems Developer, I have no time
for such child's games, I leave it to this community to draw their own conclusion.


Kind regards

Al Werner
 
C

Chetan Kulkarni

The best book I have come across. It taught me a lot and now I am well versed with it. Both books on C as well as C++ are beyong comparision .

Thanking you ,
Chetan Kulkarni
 
I
I would recommend you try Beginning Visual C++ by Ivor Horton. It is part of the Wrox series of books.
 
Dear Friend,
The best book which i have come across even for the one who knows nothing about the computers.

Yashwant Kanetkar-"Let us C++" is the name.

Please send me the mail id of Yashwant Kanetkar.

-ashishdew
 
P

pranay pushp sinha

Dear Friend, Most of the programs in the book are not running on my system. configuration is p III "windows nt 2000 " pranay pushp sinha
 
Dear,

I also have the same book. You can execute these programs in Windows 95 and in lower version. Also, you cannot run these directly there! You have to go to MS DOS prompt, and then execute it.

I have really enjoyed in executing the programs listed in this book.

Keep in touch,
Srikanth ([email protected])
 
B
Dear Friend, some of the programs in the book are not running on my system. configuration is p III "windows 98 " bhavik patel
 
P

Priyanshu Gupta

hello friend,

My name is Priyanshu, I m a computer science engineering student in college of engineering roorkee.

i have a problem in c++.

Look i want to handle the hardware part of my PC from a c++ program so that i can give signal to my printer, speaker and other devices so
that they can operate as commanded.
i have tried outport funtion in conio.h but that was useless to me i didn't get the help menu program.

so if you have the solution then please send my on my e-mail id ::

[email protected]

i will be very much thank ful of yours.

yours truly,
Priyanshu Gupta.
 
Y
Dear Friend,
The best book which i have come across even for the one who knows nothing about the computers.

Yashwant Kanetkar-"Let us C++" is the name.

Please send me the mail id of Yashwant Kanetkar.

-ashishdew
 
V

Vivek kaushik

hi,

Look i m not an expert but i can tell that if you try it out with the outport(like printer port) port address as given in properties of
system.

Try out this well more reply from other superior brains must be helping you, as this is a great brain world.

Luv and Luk
Vivek (you can call me cheetah)

My mail id is:: [email protected]
 
it's kernighaan and ritchie
and u can go through
cplusplus.com
paste it in google and open it.
it's wonderful for beginners since it has some example after evry function so u can practice at the same time.
hope it helps
 
Dear Sir,
I am sridevi from bangalore,I read the book "Test Your C Skills". I have one small doubt about logical AND,OR precedence when using with preincrement & post increment for the given below program::

main()
{
int i=-3,j=2,k=0,m;
m=++i&&++j||++k;
printf("%d%d%d%d",i,j,k,m);
}

after running this program the values of i=-2,j=3,k=0 and m=1.
Can u explain me in detail about the logic and how will get the values of i,j,k,m.
Send me prely soon sir, I will be eagerly waiting for your mail.

Thanking you,
Sridevi
 
D
Hello Sridevi:
A not so obvious behavior of the || operator is that the left side is evaluated first. If the left side is true, then the OR condition is satisfied (1 OR anything = 1) and the right side is not evaluated. The ++k never has the chance to execute.

HTH,
David Wooden
Senior Software Engineer, Systems Integration
Automation and Enterprise Solutions Group
TAS Division of Omron Electronics LLC
Office: (847) 884-7034 Extension 432
Fax: (847) 884-9383
E-mail: [email protected]
 
First of all, you are using boolean operators && and || so the result of any expression will be either 0 or 1. However, inputs to the expression are evaluated as 0 = false (0) and nonzero = true (1).

Arithmetic (bitwise) operators are & and |

Another thing to know is that the boolean operators are evaluated in what is called "short circuit" evaluation. What that means is the expression is no longer evaluated once the final value is known. What that means is that if the value to the left of && is 0, the compiler knows the result will be 0 regardless of the value on the right hand side. Likewise, if there is a 1 (or nonzero) to the left of || we know the result is 1 regardless of the value on the right hand side.

Since ++i equals -2 (nonzero) it is true (1) boolean. the next operator is && so we
continue to evaluate ++j to be 3 (also nonzero) so the result of the && operation is true (or 1). The next operator is || so we already know the result of the operation regardless of the value of the next argument, it doesn't get evaluated. It then writes the 1 to the variable m.

It surprises me a little about k not being incremented. I try to avoid any such expression which I would consider ambiguous (though a c purist might argue that there are definite rules which all compliant compilers will evaluate accordingly - I avoid purists - they're the same guys who eliminate all unnecessary parentheses because they *know* the order of evaluation).

Rufus
 
Let's follow the precedence
---> ++i gives u -2; this is a non zero value, hence ....
---> ++j is done with j=3;
---> Now, logical 1 AND logical 1 is logical 1.
---> 1 || x is 1, irrespective of the value of x being 1/0. Hence it is not required to perform it.

---> Hence the value of k, remains @ 0 itself and m is '1'.

my mail id is [email protected]
 
M

Mayank Khanwalker

Dear Priyanshu,

I don't know what OS you are using, I assume it's some flavour of windows though. First of all, windows does not allow you to directly interact with the hardware using inport OR outport functions, They are remnants from the DOS era. Some of the functions may be emulated by Windows, but they are not guaranteed to work. The solution is to either use pure DOS to try out your programs or use Win32 API to talk to the underlying hardware.

In case you are using *nix, you will have to use the libraries provided therein.

Mayank Khanwalker
[email protected]
 
Top