473,507 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Evils of M$ and C++ability

My expensive MS VC++ has been broken my Microsoft, obliging me to go the
cheap and cheerful freebie Express route, at least until a native Vista
compiler comes out.
Anyway it has a thing called .net managed code. When you try to add a C file
it complains about security vioations. Change the file to a C++ file, add an
#include "stdafx.h" and, hey presto, running code.

The moral is, you never know when you might have to cast your mallocs().
All the interesting parts of my next program will be in ANSI C, except the
bits that shall run on a Lisp intepreter written in C, but I will need to
hook it up to various windowing systems, of which Windows will be one.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Apr 7 '07 #1
19 1427
On Apr 6, 4:08 pm, "Malcolm McLean" <regniz...@btinternet.comwrote:
My expensive MS VC++ has been broken my Microsoft, obliging me to go the
cheap and cheerful freebie Express route, at least until a native Vista
compiler comes out.
Anyway it has a thing called .net managed code. When you try to add a C file
it complains about security vioations. Change the file to a C++ file, add an
#include "stdafx.h" and, hey presto, running code.
Just change the project type.
The moral is, you never know when you might have to cast your mallocs().
All the interesting parts of my next program will be in ANSI C, except the
bits that shall run on a Lisp intepreter written in C, but I will need to
hook it up to various windowing systems, of which Windows will be one.
<OT-ASIDE>
I will admit that the warning errors (unless you suppress warning
4996) about things like "fopen() has been deprecated! fread() has been
deprecated!" are truly annoying, though.

The eventual aim of managed code is a good thing overall. It aims to
make C a much safer language. And if you don't want to use it, you
can use unmanaged code.
</OT-ASIDE>

Apr 7 '07 #2
user923005 wrote, On 07/04/07 08:20:
On Apr 6, 4:08 pm, "Malcolm McLean" <regniz...@btinternet.comwrote:
>My expensive MS VC++ has been broken my Microsoft, obliging me to go the
cheap and cheerful freebie Express route, at least until a native Vista
compiler comes out.
Anyway it has a thing called .net managed code. When you try to add a C file
it complains about security vioations. Change the file to a C++ file, add an
#include "stdafx.h" and, hey presto, running code.

Just change the project type.
And make sure all the other options are set correctly.
>The moral is, you never know when you might have to cast your mallocs().
<snip>

No, the moral is learn how to drive your tools properly.
--
Flash Gordon
Apr 7 '07 #3
Malcolm McLean said:
My expensive MS VC++ has been broken my Microsoft, obliging me to go
the cheap and cheerful freebie Express route, at least until a native
Vista compiler comes out.
Anyway it has a thing called .net managed code. When you try to add a
C file it complains about security vioations. Change the file to a C++
file, add an
#include "stdafx.h" and, hey presto, running code.
That's the wrong solution. The right solution is to discard the broken
implementation and find something that works.
The moral is, you never know when you might have to cast your
mallocs().
When hell freezes over.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 7 '07 #4
On 7 huhti, 10:20, "user923005" <dcor...@connx.comwrote:
On Apr 6, 4:08 pm, "Malcolm McLean" <regniz...@btinternet.comwrote:
<OT-ASIDE>
I will admit that the warning errors (unless you suppress warning
4996) about things like "fopen() has been deprecated! fread() has been
deprecated!" are truly annoying, though.

The eventual aim of managed code is a good thing overall. It aims to
make C a much safer language. And if you don't want to use it, you
can use unmanaged code.
</OT-ASIDE>
Why is fopen() and fread been deprecated? That's just crazy.

Apr 7 '07 #5
kl**********@gmail.com said:
Why is fopen() and fread been deprecated?
They haven't been.
That's just crazy.
Don't believe all you read.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 7 '07 #6
Richard Heathfield <rj*@see.sig.invalidwrites:
kl**********@gmail.com said:
>Why is fopen() and fread been deprecated?

They haven't been.
>That's just crazy.

Don't believe all you read.
I think Microsoft has decided to treat a lot of standard C functions
as deprecated, in favor of functions from their own "safer" C library.
For more details, ask in a Microsoft-specific forum. As far as
standard C is concerned, fopen() and fread() have certainly not been
deprecated.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Apr 8 '07 #7
Keith Thompson said:

<snip>
I think Microsoft has decided to treat a lot of standard C functions
as deprecated,
So? Here we discuss C, not Microsoft's in-house coding rules.
in favor of functions from their own "safer" C library.
Never have quotation marks been sacrificed in so valiant a cause!

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 8 '07 #8
"Keith Thompson" <ks***@mib.orgwrote in message
Richard Heathfield <rj*@see.sig.invalidwrites:
>kl**********@gmail.com said:
>>Why is fopen() and fread been deprecated?

They haven't been.
>>That's just crazy.

Don't believe all you read.

I think Microsoft has decided to treat a lot of standard C functions
as deprecated, in favor of functions from their own "safer" C library.
For more details, ask in a Microsoft-specific forum. As far as
standard C is concerned, fopen() and fread() have certainly not been
deprecated.
As far as I can tell they have deprecated C. Relabelling a C file as dot cpp
makes it safe enough to be included in dot net, apparently.

Learning new languages, tools, and interfaces is a constant situation for
anyone involved in computing, and it wastes oceans of time. I spent a whole
morning getting a "hello world" dot net program to compile, because the
drawing routines had been so wrapped up in stupid interfaces. Then I spent a
whole day trying to get GNU Common Lisp to produce an executable. Eventually
I managed to coax an object file out of it, but the linker would only link
with library files in one directory. Basically Vista had screwed the paths
so badly that I couldn't undo things.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

Apr 8 '07 #9
Richard Heathfield <rj*@see.sig.invalidwrites:
Keith Thompson said:

<snip>
>I think Microsoft has decided to treat a lot of standard C functions
as deprecated,

So? Here we discuss C, not Microsoft's in-house coding rules.
Um, yes, I know that. A poster asked why fopen() and fread() have
been deprecated. Obviously they haven't, but it seemed relevant to
explain why it might seem that they have. You snipped the question
and my clarification:

| For more details, ask in a Microsoft-specific forum. As far as
| standard C is concerned, fopen() and fread() have certainly not been
| deprecated.

A sufficiently careless reader, seeing your followup but not mine,
might think that I was endorsing Microsoft's decision. Which I'm sure
wasn't your intent.

(Incidentally, I don't really know enough about what Microsoft has
done to say anything definitive on it; what I've written about it here
is inferred from what others have written about it here.)

[...]

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Apr 8 '07 #10
Keith Thompson said:

<snip>
A sufficiently careless reader, seeing your followup but not mine,
might think that I was endorsing Microsoft's decision. Which I'm sure
wasn't your intent.
Indeed it wasn't. I should add that my articles are intended only to be
read by insufficiently careless readers.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 8 '07 #11
Malcolm McLean a écrit :
My expensive MS VC++ has been broken my Microsoft, obliging me to go the
cheap and cheerful freebie Express route, at least until a native Vista
compiler comes out.
Anyway it has a thing called .net managed code. When you try to add a C
file it complains about security vioations. Change the file to a C++
file, add an #include "stdafx.h" and, hey presto, running code.

The moral is, you never know when you might have to cast your mallocs().
All the interesting parts of my next program will be in ANSI C, except
the bits that shall run on a Lisp intepreter written in C, but I will
need to hook it up to various windowing systems, of which Windows will
be one.
If you examine the documentation more carefully, you will see that
there is a #define that you can add to your environment (with the -D
option) to avoid all those warnings.

I have compiled a lot of ansi c programs without any problems using
the Microsoft compiler. You can have an "anti-microsoft" attitude
but the compiler is not a reason for that, in my opinion.

jacob
Apr 8 '07 #12
"jacob navia" <ja***@jacob.remcomp.frwrote in message
>
I have compiled a lot of ansi c programs without any problems using
the Microsoft compiler. You can have an "anti-microsoft" attitude
but the compiler is not a reason for that, in my opinion.
There's no problem compiling ANSI C programs. But I didn't buy a flashy new
dual core PC with a 2 billion dollar windowing system to run command-line
apps. I want nice graphics.

Apr 8 '07 #13
Malcolm McLean a écrit :
"jacob navia" <ja***@jacob.remcomp.frwrote in message
>>
I have compiled a lot of ansi c programs without any problems using
the Microsoft compiler. You can have an "anti-microsoft" attitude
but the compiler is not a reason for that, in my opinion.
There's no problem compiling ANSI C programs. But I didn't buy a flashy
new dual core PC with a 2 billion dollar windowing system to run
command-line apps. I want nice graphics.
I do not understand you.

I use ANSI C to build GUI programs like an IDE, a windowed
debugger, and many other GUI programs, for instance a graphical
resource editor.

Ansi C can be used to make GUI applications without any problems.

A further advantage of C is that the API is stable and it hasn't changed
since windows 3.1 (c.a. 1991). You can still run old windows
programs in the new environment.

This is not the case with the new fads like C#.

jacob
Apr 9 '07 #14
Malcolm McLean said:
"jacob navia" <ja***@jacob.remcomp.frwrote in message
>>
I have compiled a lot of ansi c programs without any problems using
the Microsoft compiler. You can have an "anti-microsoft" attitude
but the compiler is not a reason for that, in my opinion.
There's no problem compiling ANSI C programs.
So what's your problem?
But I didn't buy a
flashy new dual core PC with a 2 billion dollar windowing system to
run command-line apps. I want nice graphics.
If you can't have them, either the tool is broken, or it's the wrong
tool, or you're using it wrong. Any of these is possible, and all of
them are off-topic here, but you may well get a good answer in
<news:comp.os.ms-windows.programmer.win32>.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 9 '07 #15
jacob navia wrote:
[...]
A further advantage of C is that the API is stable and it hasn't changed
since windows 3.1 (c.a. 1991). You can still run old windows
programs in the new environment.
[...]

And I can still run my 1983 DOS programs on Vista. (I verified this
while doing some preliminary testing on Vista with the 2007 Windows
version of the program.) It seems every time a new version of
Windows comes out, the old "it won't run DOS apps" discussions
start up again.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
Apr 9 '07 #16
Richard Heathfield wrote:
>
kl**********@gmail.com said:
Why is fopen() and fread been deprecated?

They haven't been.
Not by C. They have been by MS, however. (At least when using .net,
AFAIK.)
That's just crazy.

Don't believe all you read.

--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>
Apr 9 '07 #17
Kenneth Brody said:
Richard Heathfield wrote:
>>
kl**********@gmail.com said:
Why is fopen() and fread been deprecated?

They haven't been.

Not by C.
Indeed.
They have been by MS, however.
Perhaps. Nevertheless, this is of no relevance to the C language.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Apr 9 '07 #18
On Mon, 09 Apr 2007 10:36:24 -0400, in comp.lang.c , Kenneth Brody
<ke******@spamcop.netwrote:
>And I can still run my 1983 DOS programs on Vista. (I verified this
while doing some preliminary testing on Vista with the 2007 Windows
version of the program.) It seems every time a new version of
Windows comes out, the old "it won't run DOS apps" discussions
start up again.
To be fair, DOS apps that relied on direct hardware access may
struggle. My copy of Lemmings won't run on XP, though I could just
about compel it to work on 2K provided I didn't mind rebooting the PC
afterwards....
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Apr 9 '07 #19
kl**********@gmail.com wrote:
On 7 huhti, 10:20, "user923005" <dcor...@connx.comwrote:
On Apr 6, 4:08 pm, "Malcolm McLean" <regniz...@btinternet.comwrote:
<OT-ASIDE>
I will admit that the warning errors (unless you suppress warning
4996) about things like "fopen() has been deprecated! fread() has been
deprecated!" are truly annoying, though.

The eventual aim of managed code is a good thing overall. It aims to
make C a much safer language. And if you don't want to use it, you
can use unmanaged code.
</OT-ASIDE>

Why is fopen() and fread been deprecated?
Because M$ weren't getting enough return from their embrace-and-extend
spiel anymore.
That's just crazy.
No. It's rational. But it _is_ dishonest.

Richard
Apr 10 '07 #20

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

Similar topics

0
1462
by: Jonathan M. Rose | last post by:
I am looking for a script that I can sit on an HTML server (Linux, Apache, PHP/Perl/Python/Etc.) that will allow me to do the following things: 1) Post news articles that consists of (i) a title...
6
2030
by: Tran Tuan Anh | last post by:
Hi all, I am new to Python and desperated to look for a good Python debugger. I mean a debugger with source coding tracking. For C/C++, emacs and gud offers execellent development env. The...
5
1222
by: ree32 | last post by:
I am wondering if XSL has the ability to select a node when a link is clicked on the XML document. i.e. So when a link is clicked it displays more information on that particular node ( i.e. shows...
0
1208
by: Casey Hawthorne | last post by:
The value of Big-O notation is for scale ability, since quite often a an algorithm used for small N is forgotten about in a large program and not changed when the program has to deal with larger...
3
1273
by: MLH | last post by:
I've lost ability to drag the slider bar at bottom of database window in A97 on many occasions. Have no clue as to the origin of this. Do know that its darned inconvenient. Comments appreciated.
16
2489
by: Andy_Khosravi | last post by:
I'm in a bit of a pickle. My employer, a health insurance firm, had me design a small database to track benefit issues. The intended users were technical specialists and some managers (about 90...
5
1231
by: Bob Maxie | last post by:
Hey all, I've played about with ASP.NET for a couple of years and was hoping to start going 'pro' soon. I've also have been employed as a software developer doing primarily C++ for several...
47
3830
by: Albert | last post by:
So structures are useful to group variables, so you can to refer to a collection as a single entity. Wouldn't it be useful to also have the ability to collect variable and functions? Ask K&R...
3
5140
by: rudodoo | last post by:
My company uses coldfusion to create web applications and we currently are using TOAD as a front end to creating SQL queries. I was wondering how is Access compared to TOAD on its ability to...
1
3196
by: Screenbert | last post by:
I have a web page that displays and creates DNS entries. It displays DNS entries if they exist for certain IP ranges. (Usually about 20 IP address at a time) If a DNS entry needs to be created then...
0
7223
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
7321
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
7377
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
7488
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
5623
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 project—planning, coding, testing,...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.