As you know, in C++ you can use setfill(char c); and setwidth( int length) to fill a line of a character.
It's line making a line of a character for output
NAME DEPARTMENT ...
Type: Posts; User: bvkim
As you know, in C++ you can use setfill(char c); and setwidth( int length) to fill a line of a character.
It's line making a line of a character for output
NAME DEPARTMENT ...
Oh, I've figured it out ...
Problem solved!
wow, u're such a great teacher just lighted up my mind for knowledge :))
But I'm still having 2 more questions to ask if you don't mind ^^!
1. Base on your explanation above, I guess the...
Something I'm curious
1. why do i need to cast from void* to char*?
2. how can I compare the values in those `base` memory while I don't know what kind of type they are?
3. Would you mind giving...
As you know that GNU-C provides qsort() function in <cstdlib> in this prototype
void qsort ( void * base, size_t num, size_t size, int ( * comparator ) ( const void *, const void * ) );
...
Wow, Problem solved!
I've found my stupid mistake -_-;;
It's kinda of calculating remainder, it's like 3 % 2 = 1; 100 % 10 = 0; 5 % 2 = 1; 19 % 4 = 3
and it has nothing to do with random(), which is used to generate a random value ( it should be rand()...
Here's my code for bubble sort with double type
#include <stdio.h>
void swap_double( double *a, double *b )
{
double _t = *a;
*a = *b;
*b = _t;
@all, thanks, I've got it.
When I insert a character, the string size (or capacity) is increased; however, my iterator at end and beginning is const, that is, it causes conflict in memory between...
I try to insert a character into a string at every position that modulus 3 == 0.
#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;
basic answer: it's all in memory, loaded in run-time; destroy after finishing.
it just a leak of memory.....gr
machine only understands number, you got that?
therefore, in order to represent a character, each unique number is assigned to a character. Example: 0x41 is char 'A', so whenever you print out 0x41,...
fflush(stdin) <--- undefined...
no need.
Here sample...you have to modify, use at your own risk ^^
/*
* @author bvkim
* @date 19 August, 2009
* @file sample.c
* @note
*/
you don't understand because you have no idea about network structures. If you code network through "raw sock", the code is 3-4 times longer than through "stream sock". Of course, you have to handle...
Wow....so funny...Your TITLE & FIRST POST is SEMTEX
But from 3RD POST, IT's VORTEX...
They're 2 different wargames, man.....
Well, the first levels of them are basically the same, except the...
oh man....offsetof <---- a so good macro
after reading from top post .... now I'm confused, too. o.O;;
there you gooooo
#include <stdio.h>
int main()
{
int speed;
int ret;
A good Gtk+ programming tutorial series as well:
- Prison Code Breaker Diary -: Gtk+ Programming Tutorial
linked list?
nothing much..
#include <times.h>
srand( time( NULL ) );
srand() not srandom()...
int compare( const int a, const int b ) { return (a - b); }
better visit codeproject.com :)
what a loooooooooong intro ... :D
out = (char**) calloc( i+1, sizeof ( char* ))
p/s: i'm not good at thinking or programming....