473,657 Members | 2,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open for discussion: Correct C++ tutorial part 7 "Create beginner's programs" (Windows, mingw/msvc/std)

The seventh part of my attempted Correct C++ tutorial is now available,
although for now only in Word format (use free Open Office if no Word), and
also, it's not yet been reviewed at all -- comments welcome!

"Create beginner's programs"
<url: http://home.no.net/dubjai/win32cpptut/w32cpptut_01_07 .zip>

This part focuses on basic techniques and approaches to programming,
so it could have been titled "Basic methodologies and techniques", but
what it's all about is the in-practice of creating small C++ programs.

General URL:

<url: http://home.no.net/dubjai/win32cpptut/html/>

which provides parts 1 and 2 as web-pages (HTML) in addition to the
original Word documents of parts 1 through 7 in zipped format.

Contents, part 7:

1 Use a top-down approach, a.k.a. stepwise refinement.
2 Make a routine more reusable by removing side-effects.
3 Represent a collection of items as a std::vector.
4 Use a cast + assertion to handle std::size_t for containers.
5 Use an initial vector size and a default value for items.
6 Implement a table, technique #1: manual indexing.
7 Implement a table, technique #2: vector of vectors.
8 Implement a table, technique #3: item accessor function.
9 Use a modular approach (long).
10 Use an iterative approach, “try and fail”.
11 Optimize the right thing –- if needed (long).

As before, the point of inviting comments is to _fix_ anything incorrect, or
the presentation, or whatever; your input is valuable, and you can thereby
help those who stumble across this tutorial and use it to learn C++.

Thanks in advance,

- Alf
PS: Sorry, there's still no C++ curve example! But at least now the tools and
techniques to create one are in place.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.m oderated. First time posters: Do this! ]

Jul 23 '05 #1
0 1450

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

Similar topics

6
2635
by: Todd_Calhoun | last post by:
I'm trying to learn Python (and programming), and I'm wondering if there are any places where I can find small, simple programs to study. Thanks.
39
2397
by: TonyJeffs | last post by:
Great book - I like the way that unlike other books, AC++ explains as much as possible about every piece of code discussed, so I'm not left thinking, "well...OK... I get line 12, but I wonder what the rest of it means...". Still, I have some questions, that are frustrating me:- Grateful for any comments. 1. What is the difference between #include <iostream> // (or any include file) which is used in this
8
3555
by: cainlevy | last post by:
I'm wondering if there's any way to speed up create table queries? Besides upgrading hardware, that is. The very simplest table creation query, "create table table1 ( field1 INT(10))" is taking about .03 seconds, which compared to other queries (large inserts at .01 seconds) and previous experience appears inordinately long. Further, it appears that most of that .03 seconds is some kind of overhead, since the complexity of the create table...
1
473
by: jacobryce | last post by:
I'd like to create a windows MDI in VS 2005 C# that will allow child windows to have the same options and behave similarly to those within the Visual Studio 2005 development environment. 1. In VS, if you right-click on any window, you can select between "Floating", "Dockable", "Tabbed Document", "Auto Hide", and "Hide". How can I get my child forms to provide these options - Are there such properties for child forms already available, or...
1
2762
by: Dan Bass | last post by:
I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The editing bit is not a problem, but I can't get the selected item to resize, as the listbox does for the "Add/Remove programs". The initial thought I had was to have a handler for the MeasureItem event, then have the condition of whether the...
4
5530
Cyberdyne
by: Cyberdyne | last post by:
In your All Programs Menu, some of your programs are in alphabetical order and others are not. This makes it very difficult to seek out a program that may be hidden in a maze of program folders and files. The solution is simple: have the computer re-sort the menu. When you install new programs, Windows XP tacks them to the end of your All Programs menu, rather than inserting them in the correct alphabetical order. So every so often you have...
1
1725
by: UKishore | last post by:
Hi All, Am generating a new profile by running my standalone application using the API "NetUserAdd". After logging to the newly created profile , I couldn't see default "Recently Used Programs" in StartMenu where as by Windows newly created profiles Recently Used Programs got displayed. Note: "Recently Used Programs" items are visible in windows XP and above versions Kindly let me know if any come across this and what is the...
3
1502
by: Evan | last post by:
Hello, one of my PC is window system, and in "control panel -Network Connections", I can see some network connections such as PPPOE or VPN which I created by click "create a new connection". My question is, is it possible to create a new connection by using Python script? which means I do not want to use Window UI (via "control panel"), if it is possible, I can save so many time to create various network connection when I want to do...
4
2341
by: Sean DiZazzo | last post by:
Hi all, I'm trying to find a way to get a list of all the installed programs on a Windows box via Python. I thought of a few hacks that might partially work, and then thought about "Add/Remove Programs" Seems like the right way to go. I looked over the pywin32 docs a bit, but nothing slapped me in the face. Is there any reliable way to get at that info?
0
8394
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
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...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7327
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, and deployment—without 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...
1
6164
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4152
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
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1955
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.