473,855 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A C tutorial

There is a C tutorial at
http://www.cs.virginia.edu/~lcc-win32
It is written to go with the compiler, available
at the same URL.

I have added quite a bit of material, and I would be
glad if people in this group give it a try and tell me if
I am saying nonsense somewhere.

Beware that I am not very orthodox, hence my tutorial
(and the associated compiler) is not just a tutorial about
ANSI C, but covers things like operator overloading and
other heresies :-)

And since it is running in a specific OS, windows
programming makes for quite a lot of pages. If you
use another OS however, the first part is (almost)
straight C.

jacob

Nov 14 '05
156 7740
In <c0**********@s parta.btinterne t.com> Richard Heathfield <do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:
In <c0**********@t itan.btinternet .com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:

In <c0**********@t itan.btinternet .com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:

>jacob navia wrote:
>
>> But PDF is a widely used format,
>
>Oh, I know, I know. That doesn't mean it necessarily /should/ be.

Name one document format with a public specification that should be
used instead, allowing for comparable quality of the printed output.
And explain why that format should be used instead of PDF.

Text works for me. No public spec needed; if there's anyone out there who
doesn't know what text is, I probably don't want to read their stuff
anyway.

As for the printed output, it looks pretty good from where I'm standing.
If your text printout quality is low, consider investing in a better
printer.


Show us how you can use the plain text format to display a complex
mathematical formula or the picture of your cat (dog, whatever)
with a quality comparable to that obtained from a PDF document.


That's tricky, because the quality obtained from PDF documents is so low.
Here's an example:

~I~R_^U~Pp> 7
~P$~@N `~B^S~Sm^U^ O~R~C8!^@}z~ Z^_~G?y+d ̬\^?fw1^R
-.~I:^?q~RV~C 2D~U,C%|^Rz `,~XS;I w"^]XI^R^_?eqa#]'v^L6|
HQ^X^^~^U /^V~GpA=^G~H Z^GTl6W~L^ ^`|^T~H
C^Y~C?t3^ U^E^C1~Vz^Q Fj~SM~Q~X w^RǵmH^N!X H}~Kyt0^CFTz~N lE
cx.hjAA$| O?~B^S~]Y;0H$TEC~I^K 0
~U?~W ~I|"@~Gd^V /^Q~X^An~].N~V&<Y^A^ DѬ^G~G7*
FQ~M?I~La^ HiedJ^]^W~_~H~BS^ ^X ]^S~DU^G~\%e 1o^XF~SV
I can't manage anything quite so bad using text, I'm afraid.


If this was an attempt at being funny, you failed. If it was an attempt
at being stupid, you brilliantly succeeded.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #71
Richard Bos wrote:

[PDF]
You can write your own reader, if you wish. There are systems without
HTML readers, but few people would call HTML unportable, because it is
at least possible to write an HTML reader for just about any platform;
the same thing should be true for PDF.
Hell, if you're satisfied with a plain-text representation, a PDF reader
could even be on-topic in c.l.c :-)


What an interesting idea. :-)

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #72
Dan Pop wrote:
In <c0**********@s parta.btinterne t.com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
Dan Pop wrote:
Show us how you can use the plain text format to display a complex
mathematical formula or the picture of your cat (dog, whatever)
with a quality comparable to that obtained from a PDF document.


That's tricky, because the quality obtained from PDF documents is so low.
Here's an example:
<junk characters snipped>

I can't manage anything quite so bad using text, I'm afraid.


If this was an attempt at being funny, you failed. If it was an attempt
at being stupid, you brilliantly succeeded.


It was neither. I don't expect you to understand this.

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #73
Dan Pop wrote:
In <c0**********@s parta.btinterne t.com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
I don't have a problem trusting gcc.


On the contrary, gcc is the ideal target for pulling such a trick,
precisely because its code is widely available and most people use gcc
to build gcc.


Are you claiming that gcc contains a back door? If so, do you have any
evidence to support that claim?

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #74
Richard Heathfield <in*****@addres s.co.uk.invalid > wrote:
Dan Pop wrote:
In <c0**********@s parta.btinterne t.com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
I don't have a problem trusting gcc.


On the contrary, gcc is the ideal target for pulling such a trick,
precisely because its code is widely available and most people use gcc
to build gcc.


Are you claiming that gcc contains a back door? If so, do you have any
evidence to support that claim?


No, he is not. He is claiming that _if_ you want to install a back door
of the Ken Thompson kind, _then_ gcc is your ideal target, for the
reasons he cites. Which is true.
OTOH, if you're a commercial compiler writer, you don't even need
Thompson's trick. Ask M$.

Richard
Nov 14 '05 #75
In <40******@news2 .power.net.uk> Richard Heathfield <in*****@addres s.co.uk.invalid > writes:
Dan Pop wrote:
In <c0**********@s parta.btinterne t.com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:
I don't have a problem trusting gcc.


On the contrary, gcc is the ideal target for pulling such a trick, ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ precisely because its code is widely available and most people use gcc
to build gcc.


Are you claiming that gcc contains a back door? If so, do you have any
evidence to support that claim?


I am claiming exactly what I have written above. If you have a problem
reading plain English text, it is your problem, not mine.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #76
In <c0************ *@news.t-online.com> Martin Dickopp <ex************ ****@zero-based.org> writes:
Da*****@cern.c h (Dan Pop) writes:
In <c0************ *@news.t-online.com> Martin Dickopp <ex************ ****@zero-based.org> writes:
Da*****@cern .ch (Dan Pop) writes:

In <c0************ *@news.t-online.com> Martin Dickopp <ex************ ****@zero-based.org> writes:

>Da*****@ce rn.ch (Dan Pop) writes:
>
>> In <c0*********@he rcules.btintern et.com> Richard Heathfield <do******@addre ss.co.uk.invali d> writes:
>>
>>>Mark McIntyre wrote:
>>>
>>>> BTW I bet you a groat you don't scan most programs for malicious code,
>>>> so your argument is spurious.
>>>
>>>I disagree that the argument is spurious. It's true that I don't scan most
>>>progra ms for malicious code; I don't have to, because - since they're Open
>>>Source - lots of people have done this already,
>>
>> How do you know it? If everyone reasons like you, no one is actually
>> doing it :-) ^^
>
>For the record, I often read the source code of Free Software, which
>disprove s that /no one/ is doing it. :) ^^^^^
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^
Do you know what "if" means in English?

Suffice it to say that what I wrote contains no indication that I don't.
If you disagree, please be more elaborate.


Reread the underlined text above and explain what it was supposed to
mean.


The underlined text is not a complete sentence and was therefore not
supposed to mean anything by itself. Only the whole sentence was
supposed to have meaning.


Then, pray tell, what was the whole sentence supposed to mean?

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #77
Dan Pop wrote:
In <40******@news2 .power.net.uk> Richard Heathfield
<in*****@addres s.co.uk.invalid > writes:
Dan Pop wrote:
In <c0**********@s parta.btinterne t.com> Richard Heathfield
<do******@addre ss.co.uk.invali d> writes:

I don't have a problem trusting gcc.

On the contrary, gcc is the ideal target for pulling such a trick, ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^ precisely because its code is widely available and most people use gcc
to build gcc.
Are you claiming that gcc contains a back door? If so, do you have any
evidence to support that claim?


I am claiming exactly what I have written above.


Presumably, then, you are not claiming that gcc contains a back door. Fine.
So - I /had/ no reason not to trust gcc, and I /still have/ no reason not
to trust gcc. Nothing has changed, then. Good.

If you have a problem
reading plain English text, it is your problem, not mine.


If I have a problem reading plain English text, it is indeed my problem. (I
don't, as it happens.)

--
Richard Heathfield : bi****@eton.pow ernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton
Nov 14 '05 #78
Richard Heathfield wrote:

<shrug> It is claimed that PDF documents are in a portable document format.
That's what PDF /stands for/. And yet PDF is clearly /not/ a portable
format, requiring as it does special readers which are not available on all
platforms.


That is like saying C is not portable because you need special
software for each platform it needs to support. Tell me about one
platform which does not have and acrobat reader available and
you have ever found yourself in need of one.

--
Thomas.

Nov 14 '05 #79
Da*****@cern.ch (Dan Pop) writes:
In <c0************ *@news.t-online.com> Martin Dickopp <ex************ ****@zero-based.org> writes:
Da*****@cern. ch (Dan Pop) writes:
In <c0************ *@news.t-online.com> Martin Dickopp <ex************ ****@zero-based.org> writes:

Da*****@cer n.ch (Dan Pop) writes:

> In <c0************ *@news.t-online.com> Martin Dickopp <ex************ ****@zero-based.org> writes:
>
>>Da*****@c ern.ch (Dan Pop) writes:
>>
>>> In <c0*********@he rcules.btintern et.com> Richard Heathfield <do******@addre ss.co.uk.invali d> writes:
>>>
>>>>Mark McIntyre wrote:
>>>>
>>>>> BTW I bet you a groat you don't scan most programs for malicious code,
>>>>> so your argument is spurious.
>>>>
>>>>I disagree that the argument is spurious. It's true that I don't scan most
>>>>program s for malicious code; I don't have to, because - since they're Open
>>>>Sourc e - lots of people have done this already,
>>>
>>> How do you know it? If everyone reasons like you, no one is actually
>>> doing it :-) ^^
>>
>>For the record, I often read the source code of Free Software, which
>>disprov es that /no one/ is doing it. :) ^^^^^
> ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^
> Do you know what "if" means in English?

Suffice it to say that what I wrote contains no indication that I don't.
If you disagree, please be more elaborate.

Reread the underlined text above and explain what it was supposed to
mean.


The underlined text is not a complete sentence and was therefore not
supposed to mean anything by itself. Only the whole sentence was
supposed to have meaning.


Then, pray tell, what was the whole sentence supposed to mean?


It was supposed to mean that the individual making the statement ("I")
many times ("often") systematically looks at ("read[s]") computer
programs ("Software") , which have a license that provides certain rights
("Free"), in their preferred form for studying and modifying their
behavior ("source code"), and this fact demonstrates that it is false
("disproves" ) that less than a single individual ("no one") takes steps
to find malicious code in said programs ("is doing it").

Martin
Nov 14 '05 #80

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

Similar topics

1
2935
by: Rhino | last post by:
Can anyone point me to a good free XSLT Tutorial online? I looked for some a few months ago and didn't find anything very good. I'm hoping some of the experts here can point me to a good XSLT tutorial..... -- Rhino --- rhino1 AT sympatico DOT ca "There are two ways of constructing a software design. One way is to make it
15
4243
by: binnyva | last post by:
Hello Everyone, I have just compleated a JavaScript tutorial and publishing the draft(or the beta version, as I like to call it) for review. This is not open to public yet. The Tutorial is avaliable at... http://www.geocities.com/binnyva/code/javascript/advanced_tutorial/ If any of you could spare the time, please have a look at my tutorial
18
1969
by: Xah Lee | last post by:
i've started to read python tutorial recently. http://python.org/doc/2.3.4/tut/tut.html Here are some quick critique: quick example: If the input string is too long, they don't truncate it, but return it unchanged; this will mess up your column lay-out but that's usually better than the alternative, which would be lying about a value. (If you really want truncation you can always add a slice operation, as in
0
1788
by: Joe Mayo | last post by:
I've recently updated the C# Tutorial at C# Station with a new addition, Lesson 17: Enums. The C# Tutorial may be found at http://www.csharp-station.com/Tutorial.aspx. Other updates include: 1. Downloadable source code. 2. All example programs run on-line as NTD apps. 3. A support forum for discussing the Tutorial.
10
3096
by: Safalra | last post by:
When a poster in a forum I frequent said they were beginning to learn HTML, I thought I should direct them to a good HTML tutorial so that they wouldn't start using <blink> and the like. Remembering that this group has discussed HTML tutorials several times in the past, I searched the Google Groups archives, but all I can find are tutorials unfortunately demonstrating Flavell's Law. Searching the internet, the only accurate tutorials for...
11
2944
by: Magnus Lycka | last post by:
While the official Python Tutorial has served its purpose well, keeping it up to date is hardly anyones top priority, and there are others who passionately create really good Python tutorials on the web. I think 'A Byte of Python' by Swaroop C H is a good beginners tutorial, and 'Dive Into Python' by Mark Pilgrim is a good tutorial for more experienced programmers.
7
2261
by: Turbo | last post by:
I have a written a detailed html tutorial here:- http://sandy007smarty.seo.iitm.ac.in/2006/09/26/html-tutorial/ I know there are a couple of html tutorials out there. But its a tutorial without links!! Everything in one page. Please leave a comment if you like it.
2
2113
by: sara | last post by:
Hi All, I learned C++ long time ago and now I want to review all of its details in a short time like a week. I wonder if there is a good tutorial you know which I can read for this purpose. Thanks a lot.
0
9903
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9754
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11044
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10692
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10375
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9526
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, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5754
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5952
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4168
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.