˹á
 úҹ
  C/C++ new
  Java new
 Sourcecode.TV
  Android
  Blackberry
  C/C++
  Java
  Linux
  Windows Phone
  ͧͧ
 
  .NET
  Android
  Blackberry
  C++Builder
  Delphi
  Java
  Mobile
  Open Source
  Pocket PC
  Visual Basic
  Web
  Windows Phone
  Others
 Ẻ¹
  ASP
  ASP.NET Webmatrix
  C++
  eVB
  J2ME
  Java
  PHP
 
  Android
  ASP
  C++
  VC++
  CGI-Perl
  Delphi
  Java
  jQuery
  PHP
  Visual Basic
  .NET
 ԡèҡ
  Դ...
  DoodeeHosting
  Ѻ͡Ẻ Ѳ䫵
  Freeware
  ѵҤɳ
  ª١
  ʶԵԼ
 Ŵ
 Ң
 дҹʹ
  .NET
  C/C++
  Delphi
  Java
  Palm/PocketPC
  Visual Basic
  Web
 
 дҹҹ
 ԧ
 ǡѺ
 ѵҤɳ
Social Network

Facebook  Twitter  YouTube
 New Article
 Webboard
 Freelanceboard
Freeware
 (BerDee)
(Android)
駩غ
駩غ(Android)
WebcamMonitor
WebcamMonitor(Windows)
scSendMail
scSendMail(Windows)
MSN Caption
MSN Caption(Windows)
  Freelance comment
  ԴͺʹФѺ...
2015-07-29 13:35:58
  Ҽͧ纷ѲҴ HTML5 ...
2015-01-18 15:33:54
  Ҽͧ纷ѲҴ HTML5 ...
2015-01-18 15:32:51
  ԴͺФѺ
ҹ...

2014-01-06 12:47:38
  ѧҤ͹ ͧ֡ͧ...
2013-07-06 01:04:37
  ʹ觢ͺࢵҤҤҡ͹ФѺ...
2013-03-24 18:54:20
  ѧդѺҹԴѺ 08...
2012-12-16 19:18:14
  ʹ㨤 Դ 0905076277...
2012-11-12 11:07:46
  Ѻ礹ѡ֡ͺѷ
...

2012-10-29 03:10:46
  sukit_te34@hotmail.com...
2012-10-29 03:09:36
  Webboard comment
  <a href=https://www.yout...
2017-01-19 04:25:26
  ...
2017-01-17 19:09:32
  ...
2017-01-17 00:02:16
  ...
2017-01-16 15:32:27
  ...
2017-01-16 04:23:28
  Ҥ׹...
2016-10-27 14:56:42
  ˹¤Ѻ...
2016-10-27 14:49:44
  ʹ㨴դѺ ԴҤ...
2016-09-28 19:15:57
  кǹõԻѺ htt...
2016-09-28 19:05:00
 
https://...

2016-09-05 00:01:35
  Homework comment
  鴷ӧҹẺ ...
2016-09-06 01:00:12
  ҡҺ鴹Ѻѧ...
2016-09-05 09:31:27
  ͧ֡¹...
2016-04-22 00:47:49
  ἹѧͧѺѡ...
2016-04-21 19:24:55
  ѡ÷ ѧ ...
2016-02-09 20:07:06
  ɹФ ˹ͧӵ...
2016-02-09 09:29:39
  ѧդ¹ bash shell ...
2016-01-26 11:25:12
  ҡ͹ҧ ԷԹ ...
2016-01-25 15:41:54
  ӵ鹵͹ѧ
-Ӥ...

2015-11-22 20:41:09
  ͤйӤѺ

¹...

2015-11-22 18:25:33
  Article comment
  Ѻ س "Դ" ͧ֡...
2016-06-18 15:21:09
  vs2008 c# Ѻ ͺسѺ...
2016-06-17 14:39:30
  vs c# ӵآ鹵͹...
2016-06-17 14:37:44
  ͧѺ "Ҩԧ ...
2016-03-12 23:36:05
  觢ͤǧ LAN ੾Ф...
2016-03-12 18:25:42
  Terminal Mac ...
2016-02-16 11:02:01
  Terminal ͤ...
2016-02-16 05:58:21
  仵 ç¤Ѻ
2016-01-25 13:29:55
  ǹ!!! ͧä¹ App ...
2016-01-25 10:56:34
  ӵйӨش...
2016-01-20 23:30:25
  9Mcode comment
  ҡ...
2014-02-21 08:52:19

Link Exchange

ѵҤɳ
Statistics of Sourcecode in Thailand
 
 C++ Tutorial  

- - - - - - - - - - - - - - ʹѺʹع- - - - - - - - - - - - - -

 C++
 
 

ʵԧ

 

㹺ҨҾٴ֧ʵԧѹФѺ

   
 
#include <iostream.h>

int main()
{
char name[7];
char hello[6]="Hello";
name[0]='V'; name[1]='i'; name[2]='k'; name[3]='i'; name[4]='n'; name[5]='g'; name[6]='\0'; cout<<hello<<"\n"; cout<<"My name is "<<name<<"\n"; for(int index=0;index<=6;index++) cout<<name[index]<<"\n"; return 0; }
 
   

[Download Code]

ҡҧҧ쪹Դ char ҤѺ Ըҧҧ繹ФѺ [ӹǹ] ¶ҡ˹ӹǹ 7 ͹ҧҡõ 0-6 7 ǤѺ

ҡѺ ͹Ѻҵø §˹Ƿ ҹ鹤Ѻ ҡҵͧá˹ ͹ҡѺ hello ФѺ ôѧࡵͧͺѡè繤ẺѹФѺ

ش¤ٻ͡ҷеѡäѺ ¤á index Ҩդ 0 ѧ name[0] Ѻ СѧյçҢͧ name[6]=0 0 ͵Ƿ騺ӹФѺ

ҧö繢ŪԴáѺ int name[5], float name[10] 繵

   
 
#include <iostream.h>

int main()
{
int value[2][3];
char name[]="Viking";
value[0][0]=10; value[1][2]=5; cout<<name<<"\n"; cout<<value[0][0]; return 0; }
 
   

[Download Code]

ҧ繵ҧٻẺ蹹ФѺ ѹá͡ҧԵԤѺ Ըաҧҧ繹ФѺ 㹵ҧ 2 ԵԹФѺ лСͺ 6 (2*3) value[0][0], value[0][1], value[0][2], value[1][0], value[1][1], value[1][2] Ѻ

ǹաѹ˹觡 char name[] ѹ˹ӹǹҤ viking Ǥ仡˹ͧѵѵԤѺ

   
 
#include <iostream.h>
#include <string.h>

int main()
{
char name[20];
char one[10];
strcpy(name,"Viking"); cout<<name<<"\n"; strcpy(one," Man"); strcat(name,one); cout<<name<<"\n"; for(int index=strlen(name);index>0;index--) cout<<name[index-1]; return 0; }
 
   

[Download Code]

ҧʴ֧ԸաѧʵԧẺҧ Ѻ áҨеͧҧ֧ź ͧʵԧ͹ФѺ蹡 #include <string.h> Ѻ

á 繡 strcpy 繤觷ѺͻѺ ٻẺ strcpy(, )
觷ͧ strcat 繤觷ͻӵͷµ ٻẺ strcat(, ӷйҵͷ) ͹Ѻҧҡͻ Man ҵͷ¤ Viking Ѻ
ǹش¡ strlen 繤觷ѴǢͧ Ѻ

ǹͧٻ ѹҡѧ˹ҤѺ ҧ index դҡѺǢͧ name Ѻ 㹡ǹٻФ Ңͧ index ŴŧѺ ǹͧ觹ҡеѡ¾͹ѧӹФѺ բѧࡵç name[index-1] ͧ -1 ҵѡõش¢ͧ ʵԧ Null ФѺ

 

BACK

ŧ Mini DisplayPort to HDMI Adapter ŧ Mini DisplayPort to HDMI Adapter Ѻͧ macbook air/pro, mac mini
ŧ Mini DisplayPort to HDMI Adapter Ѻͧ macbook air/pro, mac mini (300ҷ)
HDMI  3 ͡  1
HDMI 3 ͡ 1 (350ҷ)
Ի͹¹
¹¹ͷ
¹¹͹´
¹¹
¹¹ վʾ
¹¹
¹ҹԹء
¹¹Թ⿹
¹¹Ϊ ʤ
9M Blog ͧ͡ ¹ͧ
ԡ ҾѺԭ
OrmSin.com: ˹ѧͧҹ--չ (country crafts)
ѵҤɳ
 
Tutorial
eVB Tutorial
ASP.NET Webmatrix Tutorial
J2ME Tutorial
C++  Tutorial
Java  Tutorial
PHP Tutorial
ASP Tutorial
 
ẺǨ
Freelance ѺѲ

Home - Article - Tutorial - Sourcecode - Dev Handbook - Search - WebBoard - Links - About Us

ʧǹԢԷ Ѵ͡ ӫ Ѵŧ ٻẺ Ѻ͹حҵѡɳѡ
Ţ¹ҳԪ硷͹ԡҡзǧҳԪ: 7100503002000
Copyright 2001 SourceCode.in.th