Ch 4 of my Norwegian intro to C++ available

The Norwegian introduction to C++ programming (a bit Windows-specific) is at Google Docs, in PDF format, 4 chapters so far:

Introduksjon til C++-programmering (Windows)

Each file has a nice table of contents but for that you need to download the PDF and view it in e.g. Foxit or Adobe Acrobat. Ch 1, the Introduction, is just 1 page, though. Ch 2, tooling up with Visual C++ and learning about some Windows stuff, is more pages. And so is ch 3, about basic C++ such as loops and decisions. And ch 4, about creating console programs (all programs so far just GUI), chimes in at some 50 pages!

Perhaps it’ll become a book…

Here’s a table of contents generated by (1) using a Word TOC field and half-documented RD fields to refer to the chapters, (2) [Shift Ctrl F9] in Word (is that still documented anywhere?) to “lock” the text, (3) edit, removing unwanted entries, (4) copy as text to Crimson Editor, save, and (5) run a very very hairy C++ program to generate the HTML.

Oh, I see in the preview that instead of a purely numbered list, in the WordPress blog I get letters and roman numerals!

So be it – but there’s also a PDF of the original over at Google docs (link above).

  1. Introduksjon. | 1
  2. Første program, etc. | 1
    1. Gratis verktøy. | 1
    2. Muligens ikke helt typiske installasjonsproblemer… | 2
    3. “Hallo, verden!” i Visual Studio / om IDE prosjekter. | 6
    4. Feilretting i Visual Studio / generelt om C++ typesjekking. | 15
    5. Hva “Hallo, verden!” programteksten betyr. | 18
    6. Spesielt aktuelle Windows-ting for nybegynneren. | 21
      1. Makroer og Unicode/ANSI-versjoner av Windows API-funksjoner. | 22
      2. Moderne utseende på knapper etc. / om DLL-er og manifest-filer. | 23
      3. Ikon og versjonsinformasjon / [.exe]-fil ressurser. | 28
    7. Gir C++ ekstra mye kode og kompleksitet? | 32
    8. Å finne relevant informasjon om ting. | 32
      1. Tipsruter og automatisk fullføring. | 32
      2. Å gå direkte til en aktuell deklarasjon eller definisjon. | 33
      3. Full teknisk dokumentasjon / hjelp / kort om Microsofts “T” datatyper. | 34
      4. Dokumentasjon av C++ språket og C++ standardbiblioteket. | 36
      5. Diskusjonsfora på nettet / FAQ-er. | 38
  3. Et første subsett av C++. | 1
    1. Gjenbruk av egendefinerte headerfiler. | 1
      1. En wrapper for [windows.h]. | 2
      2. Å konfigurere en felles headerfil søkesti i Visual Studio 2010. | 6
      3. En muligens enklere & mer pålitelig måte å konfigurere Visual Studio på. | 9
    2. Grunnleggende data. | 12
      1. Variabler, tilordninger, oppdateringer, regneuttrykk, implisitt konvertering. | 14
      2. Implisitte konverteringer. | 15
      3. Initialisering og const. | 16
    3. Tekstpresentasjon og strenger. | 17
      1. Arrays som buffere, konvertering tall ? tekst. | 17
      2. Strenger, konkatenering og std::wstring-typen, anrop av medlemsfunksjon. | 18
      3. Å lage tekstgenererings-støtte / egendefinerte funksjoner & operatorer. | 22
    4. Løkker, valg og sammenligningsuttrykk. | 27
      1. Sammenligninger og boolske uttrykk. | 32
      2. Valg. | 34
      3. Løkker. | 39
    5. Funksjoner. | 41
      1. Hva du kan og ikke kan gjøre med en C++ funksjon. | 41
      2. Funksjoner som abstraksjonsverktøy. | 41
      3. Verdioverføring og referanseoverføring av argumenter. | 45
  4. Kommandotolkeren. | 1
    1. Windows kommandotolkeren [cmd.exe]. | 2
      1. Å kjøre opp en kommandotolker-instans / konfigurering av konsollvinduer. | 2
      2. Kommandoer / hjelp. | 8
      3. Kommandoredigering & utklippstavle-operasjoner. | 11
      4. Linjekontinuering & tegn-escaping. | 11
      5. Operatorer & sammensatte kommandoer / omdirigering & rørledninger. | 12
      6. Erstatting av miljøvariabel-navn / arv av miljøvariabler. | 15
      7. Kommandotolkerens søk etter programmer: %path% og %pathext%. | 16
    2. Navigasjon. | 17
    3. Å kompilere fra kommandotolkeren. | 21
      1. Å nei! “Hallo, verden!” igjen! | 22
      2. Konsoll kontra GUI subsystem. | 24
      3. Å angi linker-opsjoner til kompilatoren / separat kompilering og linking. | 26
      4. Å be kompilatoren om standard C++, please. | 27
      5. Å angi headerfilkataloger, også kjent som inkluderingskataloger. | 28
    4. Batchfiler – å automatisere f.eks. et standardoppsett. | 31
    5. C++ iostreams. | 33
      1. iostream-objekter for standard datastrømmene. | 33
      2. Datastrøm orientering: nix mix (av char og wchar_t datastrømobjekter). | 36
      3. Å detektere “slutt på datastrømmen” (EOF, end of file). | 36
      4. Innlesing av strenger. | 40
      5. Praktikalitetsdigresjon: hvordan bli kvitt navneromskvalifikasjonene. | 42
      6. Innlesing av tall. | 43
      7. Formatert utskrift med iostream manipulatorer. | 48

Cheers, & enjoy! – Alf

Advertisement

Errata #1 for Norw. intro to C++ programming

The Norwegian introduction to C++ programming (a bit Windows-specific) is at Google Docs, in PDF format, 3 chapters so far:

Introduksjon til C++-programmering (Windows)

Each file has a nice table of contents but for that you need to download the PDF and view it in e.g. Foxit or Adobe Acrobat. Ch 1 is just 1 page, though. Ch 2 is more pages. And so is ch 3.

Perhaps it’ll become a book…

Errata: I discovered that I’d badmouthed MinGW g++. I stated that it still didn’t support std::wostringstream & friends in version 4.1.1. That was incorrect.

The truth is that it didn’t support std::wostringstream & friends in version 3.4.5.

Now that is an old version, but it’s still the version that you get via the MinGW installer. To get a later version you can either download a build from Someone Else, such as the TDM build, or you can try to download the various individual package files from MinGW (I did that for version 4.5.0, it was a lot of work). So I guess an ordinary novice, the kind of person most likely to use MinGW g++, is mostly stuck with version 3.4.5.

Anyway, toolwise the intro is based on Visual C++ 10.0, and I have updated the ch 3 PDF at Google Docs so that it now says 3.4.5, not 4.4.1. 🙂

– Alf

Current TOC for my Norwegian intro to C++

About the Norwegian C++ intro, see my earlier posting.

Not sure if this works or not, but I’m trying to embed a PDF of a Table of Contents generated by Word:

Enjoy! 🙂  [Possibly/probably more to come, after all, I’m referring to chapter 4!]

– Alf

By the way, Olve, as you can see I’ve now added a chapter 3! Not quite at 42 yet… But.