วิชาการ.คอม - คลังความรู้ ปัญญาไทย เพื่อการศึกษาไทย เพราะเรารักเมืองไทย
เว็บส่งเสริมการเรียนรู้ดีเด่น 2547 (สมาคมผู้ดูแลเว็บไทย)   |   เว็บสื่อวิทยาศาสตร์ดีเด่น 2549 (กระทรวงวิทย์)   |   เว็บการศึกษาที่มียอดผู้เข้าชมสูงสุด 2549, 2550 (TrueHits)
ขอขอบคุณ บริษัท ปตท. จำกัด (มหาชน) และ สสวท ที่ให้การสนับสนุน  
แจก Source จ้า แจก Source ฟรี!!
โพสต์เมื่อ: 11:31 วันที่ 22 มี.ค. 2549         ชมแล้ว: 4,559 ตอบแล้ว: 110
แจก sorce code C++ ฟรีไม่มีอั้น ลองอ่านกันนะ

samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

จำนวน 97 ความเห็น, หน้า่ | 1| 2| 3| 4| -5-
ความเห็นเพิ่มเติมที่ 78 22 มี.ค. 2549 (13:26)
//+++++++++++++++++++++++++++++++++++++++Funtion AutoFill++++++++++++++++++++++++++++++++++++++++++++++

void Autofill(char * str,unsigned char len)
{
//declare variable
char tmp_buff[15] = "";
unsigned char size = (len - abs (str - strchar (str,0)));


//process of function
for(;posit < (size - 1);posit++)
tmp_buff[posit] = (char) 'o';
tmp_buff[posit]=0x0;
strcat(tmp_buff,str);
strcpy(str,tmp_buff);
}
//+++++++++++++++++++++++++++++++++++++End Funtion AutoFill++++++++++++++++++++++++++++++++++++++++++++
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 79 22 มี.ค. 2549 (13:27)
ฟังก์ชั่น สุดท้าย เย้ หมดแล้ว
chp_dis

#include<stdio.h>
#include<conio.h>

#define ESCK 0x1b
#define ENTERK 0x0d
#define BKSPK 0x08

//desccription of function
//1. get any nummeric only with 13 character about product
//2. can user key backspace
//3. if user key 5 character then return value and goto main function (end of function)
//4. function declare about put code for main program only
//5. end of funtion with ESC Code or get nummeric with five character
//6. this float only

//declare function in CheckCod.c
char Mykey(unsigned char*);
void Myputch(char);
void Autofill(char*,unsigned char);
void fillch(unsigned char,unsigned char,char ,unsigned char,unsigned char ,unsigned char );
unsigned char GetNum(unsigned char,unsigned char,char*,unsigned char,unsigned char*,unsigned char*);
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 80 22 มี.ค. 2549 (13:29)
#include<stdio.h>
#include<conio.h>

#define ESCK 0x1b
#define ENTERK 0x0d
#define BKSPK 0x08

//desccription of function
//1. get any nummeric only with 13 character about product
//2. can user key backspace
//3. if user key 5 character then return value and goto main function (end of function)
//4. function declare about put code for main program only
//5. end of funtion with ESC Code or get nummeric with five character
//6. this float only
//------------------------------------This is fuction main---------------------------------------------
char chp_disc();
{

// declare varible for function
char str[7+1]="" //string 7 and first declare = NULL
unsigned char ascii =0x0 //store ascii code in every code declare = 0(in hexemal)
unsigned char s_code =0x0 //store Address for code in keyboard declare = 0(in hexemal)

// process main of funtion
printf("(4.) product Discount : ")
Getnum(wherex(),wherey(),str,sizeof(str),&ascii,&s_code)
strcpy(str,product_discount);

if (*ascii = ENTERK)
return(int)(0)
}

//----------------------------------this is another function-------------------------------------------
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 81 22 มี.ค. 2549 (13:30)
//++++++++++++++++++++++++++++++++++++++++Funtion Mykey++++++++++++++++++++++++++++++++++++++++++++++++
char mykey(unsigned char *s_code)
{
char ch = 0x0;

if((ch = getch())==0) // if user key 0
{
*s_code = (unsigned char)getch();
ch = 0;
}

return(char),(ch);
}
//+++++++++++++++++++++++++++++++++++++End Function Mykey++++++++++++++++++++++++++++++++++++++++++++++
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 82 22 มี.ค. 2549 (13:31)
//++++++++++++++++++++++++++++++++++++++++Funtion GetNum+++++++++++++++++++++++++++++++++++++++++++++++

//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+function description of GetNum+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

//Description : getting only set of alphanumerric.
//parameter : x,y = (position)
// *str = address of string (use pointer)
// len = size of str (use fuction sizeof(str))
//returning : posit = how many leght of string
// *ascii = value of ascii (use pointer)
// *s_code = value of san code (use pointer) seek for address of key on keyboard

//+-+-+-+-+-+-+-+-+-+-+-+-+-+End function description of GetNum+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 83 22 มี.ค. 2549 (13:31)
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+process of GetNum-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
unsigned char GetNum(unsigned char x,unsigned char y,char *str,unsigned char len,unsigned char*ascii,unsigned char *s_code)
{
unsigned char posit = 0x0;
Fillch(x,y,'_',(len-1),14,4) //call function Fillch
gotoxy(x,y);
do
{
*ascii = Mykey((unsigned char*)_scode); //call function Mykey
if(ascii == ESCK)
break;
// if user key ESC Code then break
else if (*ascii == BKSPK)
{
if (posit>0)
{
textcolor(14);
textbackground(4);
*(str+(--posit)) = 0x0;
putch('\b'); //backspace
Myputch('_') //call Myputch fuction
putch('\b'); //backspace
}
continue;
}
//check key about nummeric key
if ((*ascii >= '0')&&(*ascii <= '9')&&(*ascii <= '.'))
{
*(str + posit) = (char) *ascii;
*(str + (++posit)) = (char) 0x0;
Myputch(*ascii); //call Myputch fuction
}
else putch(7); //one sound beep
}while (posit<(len-1))
if(posit == (len-1))
*ascii = (unsigned char)ENTERK;
// set acception for key value
if((posit < (len - 1)) && (*ascii == ENTERK))
{
AutoFill(str,len);
gotoxy(x,y);
printf("%s",str);
}

return (unsigned char) (posit);
}
//++++++++++++++++++++++++++++++++++++++End Funtion GetNum+++++++++++++++++++++++++++++++++++++++++++++
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 84 22 มี.ค. 2549 (13:33)
สุดท้ายค่ะ

//++++++++++++++++++++++++++++++++++++++++Funtion Fillch+++++++++++++++++++++++++++++++++++++++++++++++

void fillch(unsigned char x,unsigned char y,char ch,unsigned char len,unsigned char f_color,unsigned char Bg_color)
{
//declare variable
unsigned int far* attr = (unsigned int far*) 0xb8000000;
unsigned value = ((unsigned)(((unsigned char)bg_color << 4) &0xf0) | ((unsigned char) f_color & 0x0f)) << 8) | ((unsigned)ch & 0x00ff));
unsigned posit = ((--y * 80) + (--x)) ;
unsigned lenght = 0;

//process of function
*(mem_ch (((y - 1) * 160 + (x - 1)* 2))) = (char)ch;
gotoxy((x = ((++x)>80)? 80 : x), y) //ternary expression
}
//++++++++++++++++++++++++++++++++++++++End Funtion Fillch+++++++++++++++++++++++++++++++++++++++++++++

จบแล้วค่ะ ...
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 85 22 มี.ค. 2549 (13:35)
เป็นยังไงกันบ้างคะ คงตาลายกันบ้าง ไม่มากก็น้อย

ยังไงก็รบกวนหน่อยนะคะ
อาจเป็นเพราะเบลอ จึงมองไม่เห็นข้อผิดพลาด

ท่านเป็นคนนอก ช่วยมองหน่อยนะคะ ขอบคุณค่ะ
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 86 22 มี.ค. 2549 (13:38)
ฟังก์ชั่น
1.) chckaddr
2.) chckborn
3.) chckp_id
4.) chckphon
5.) chckpwd
6.) chckreg
7.) chcks_id
8.) chcksala
9.) ch_size
10.) chkp_nam
11.) chks_nam
12.) chp_cost
13.) chp_disc
14.) chp_prze
15.) chck_date
16.) chckqty Address

คืนค่า (ตามลำดับ)
Born
Product_id
Phone
Password
Register
Seller_id
Salary
Size ***
Product_name
Seller_name
Product_cost
Product_discount
Product_prize
Present_date
Quantity

ตรวจสอบการคืนค่าแล้ว
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;
&#8730;

ต้องการการกด enter (lสามารถกด enter ได้)
&#8730;






&#8730;

&#8730;
&#8730;
&#8730;
&#8730;
&#8730;

&#8730;
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 87 22 มี.ค. 2549 (13:42)
หมายเหตุ ค่า

&#8730

คือค่า true หรือเครื่องหมายถูกค่ะ
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 88 18 เม.ย. 2549 (16:08)
ไม่มีใครช่วยเลยหรือคะ ???
หรือว่าคนเขียนเขียนไม่รู้เรื่องคะ
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 89 18 เม.ย. 2549 (16:56)
ไม่เห็นบอกว่าโปรแกรมทำหน้าที่อะไรเป็นหลัก ...

อย่างนี้คนนอกอย่างผม ต้องนั่งอ่านโค้ดเองทั้งหมด เพื่อที่จะทราบหรอครับว่ามันคือโปรแกรมอะไร - -'
za-Nuker (IP:203.151.72.142,,)

ความเห็นเพิ่มเติมที่ 91 6 พ.ค. 2549 (23:10)
อ่าว นายนุก
หุๆ นั่นสิครับ ไม่เห็นบอกเลยว่าทำอะไรเป็นหลัก
Fender_moo (IP:58.147.83.15,,)

ความเห็นเพิ่มเติมที่ 92 7 พ.ค. 2549 (16:55)
รบกวนคุณ samongi ช่วยอธิบายหน่อยได้มั้นครับว่านี้มันเป็นโปรแกรมอะไรครับ และทำอะไรได้บ้าง มาถึงก็มีแต่ดค้ดอ่าครับ ผมเลยไม่รู้ว่ามันคืออะไร
*ptr-> (IP:203.188.43.6,,)

ความเห็นเพิ่มเติมที่ 102 8 พ.ค. 2549 (22:28)
อารายกานเหรอ
pawnlife เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 27 ครั้ง - ได้รับดาวแล้ว 152 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 103 14 พ.ค. 2549 (23:31)
งงอ่ะ ซอร์ดโค้ดโปรแกรมไรอ่ะ
Tk (IP:203.113.16.241,203.113.39.9,)

ความเห็นเพิ่มเติมที่ 104 15 พ.ค. 2549 (19:21)
น่าจะเป็นของภาษา C อ่ะครับ ถ้าดูไม่ผิด
StudyToday.net เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 4 ครั้ง - ได้รับดาวแล้ว 152 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 106 16 พ.ค. 2549 (11:01)
เป็นการกำหนดค่าให้ผู้ใช้กรอกค่าให้ถูกต้องค่ะ
ก็จะแบ่งไปตามประเภทที่ใช้ออกเป็น 2 ประเภทหลักๆ
คือ
1. ไม่จำเป็นต้องเต้มฟิงส์ เช่น
กำหนด ชื่อ หรือที่อยู่เป็นค่าฟิวดิ์สูงสุดไว้
เมื่อผู้ใช้กรอกเสร็จให้กด Enter ค่ะ
2. จำเป็นต้องเต็มฟิวส์ เช่น
รหัสบัตรประชาชน รหัสสินค้า เป็นต้นค่ะ
samongi เก็บเข้า Contact List ส่ง vSMS
ร่วมแบ่งปันความรู้และความเห็นแล้ว 996 ครั้ง - ได้รับดาวแล้ว 249 ดวง - โหวตเพิ่มดาว

ความเห็นเพิ่มเติมที่ 108 27 ก.ค. 2551 (21:44)

ช่วยเขียนโปรแกรม Notepage ด้วยภาษาซีให้หน่อยคับ
โดยมีฟังกืชันการทำงานดังนี้

สามารถพิมพ์ข้อความหลายตัวได้
ขึ้นบันทัดใหม่ได้
Save ได้
คับ
ขอบคุณล่วงหน้านะคับ


moshimaru_next@hotmail.com (IP:202.142.204.2)

ความเห็นเพิ่มเติมที่ 109 27 ก.ค. 2551 (22:46)

ใช่อย่างนี้หรือเปล่า
#include<stdio.h>
#include<conio.h>
char i;
 main(){
        printf("Your text==> ");
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
        scanf("%s
",&i);
      
      
       getch();
}


ใช่อย่างนี้หรือเปร่า (IP:118.172.62.198)

ความเห็นเพิ่มเติม วิชาการ.คอม

ชื่อ / email:
ข้อความ

รูปภาพ หรือ ไฟล์
กรุณาล๊อกอินก่อน เพื่อโพสต์รูปภาพ และ ใช้ LaTex ค่ะ สมัครสมาชิกฟรีตลอดชีพที่นี่
ตัวช่วย 1: CafeCode วิธีการใช้
ตัวช่วย 2: VSmilies วิธีการใช้
ตัวช่วย 3: พจนานุกรมไทย ออนไลน์ ฉบับราชบัณฑิต
ตัวช่วย 4 : dictionary ไทย<=>อังกฤษ ออนไลน์ จาก NECTEC
ตัวช่วย 5 : ดาวน์โหลด โปรแกรมช่วยพิมพ์ Latex เพื่อแสดงสมการบนวิชาการ.คอม

ขอบคุณผู้สนับสนุน

Hot Links

Google
 
ติดต่อลงโฆษณา :   คุณอันนา 086-4907600,
0-2583-2802
และ 086-4907585
สำนักงาน :   0-2642-7828
อีเมล์ :   
Copyright© 2000-2007, Vcharkarn.Com. All rights reserved.
คลิ๊กเพื่อดูสถิติ
รับรองและสนับสนุนโดย

สสวท.

มูลนิธิ พสวท.

พสวท.