본문 바로가기

반응형

프로그래밍

(35)
레슨 1: The basics of C++ ( C++ 의 기본 ) Lesson 1: The basics of C++ This tutorial series is designed for everyone: even if you've never programmed before or if you have extensive experience programming in other languages and want to expand into C++! It is for everyone who wants the feeling of accomplishment from a working program. What do I mean? C++ is a programming language--it will allow you to control your computer, making it do w..
구구단 출력 소스 C /* ** CTable. Version 1.0. */ /*NOTE: Minor Changes have been made to enable this program to run under TClite Credit goes to David van Leerdam */ #include #include #include #include #include #define NAMELEN 11 #define MAX10 #define MIN1 char name[NAMELEN]; short int number,wrong; int table,answer,ch; int checktable(int table); int checktable(int table); void cap(char *ptr2name); int main(void) {..
8진수, 16진수의 이해 Understanding Different Base SystemsThis essay is targeted at new students of computer programming or computer science who want to understand how base two (binary), base eight (octal), and base sixteen (hexadecimal) work. First of all, it's important to realize that each of these base systems is just another way of writing down the same number. When you convert a number between different bases, ..
2진 트리 검색 Binary Search Trees Binary search trees (also known as just binary trees) are ordered trees in which all nodes have no more than two children. The parent node is always greater than all of the data in the left sub-tree that extends from the left child node, and the parent node is less than all of the data in the right sub-tree that extends from the right child node. Here is the basic framwork fo..
The C Preprocessor The C PreprocessorThe C preprocessor modifies a source code file before handing it over to the compiler. You're most likely used to using the preprocessor to include files directly into other files, or #define constants, but the preprocessor can also be used to create "inlined" code using macros expanded at compile time and to prevent code from being compiled twice. There are essentially three u..
The C++ Modulus Operator The C++ Modulus OperatorTake a simple arithmetic problem: what's left over when you divide 11 by 3? The answer is easy to compute: divide 11 by 3 and take the remainder: 2. But how would you compute this in a programming language like C or C++? It's not hard to come up with a formula, but the language provides a built-in mechanism, the modulus operator ('%'), that computes the remainder that res..
Getting Random Values in C and C++ with Rand Getting Random Values in C and C++ with Rand Written by RoDAt some point in any programmer's life, he or she must learn how to get a random value, or values, in their program. To some this seems involved, difficult, or even beyond their personal ability. This, however, is simply not the case. Randomizing of values is, at its most basic form, one of the easier things a programmer can do with the ..
Formatting Cout Output in C++ using iomanip Formatting Cout Output in C++ using iomanipCreating cleanly formatted output is a common programming requirement--it improves your user interface and makes it easier to read any debugging messages that you might print to the screen. In C, formatted output works via the printf statement, but in C++, you can create nicely formatted output to streams such as cout. This tutorial covers a set of basi..

반응형