FILE NAME: dc_motor.c CHIP TYPE: ATMEGA16 CLOCK FREQUENCY: 8MHZ IDE: VSMStudio COMPILER: AVR-GCC
標(biāo)簽: PWM
上傳時(shí)間: 2015-03-01
上傳用戶:abilibili
第一節(jié)、samba是干什么的?它有什么用? Samba(SMB是其縮寫) 是一個(gè)網(wǎng)絡(luò)服務(wù)器,它是Linux作為本地服務(wù)器最重要的一個(gè)服務(wù),用于Linux和Windows共享文件之用;Samba可以用于Windows和 Linux之間的共享文件,也一樣用于Linux和Linux之間的共享文件;不過對于Linux和Linux之間共享文件有更好的網(wǎng)絡(luò)文件系統(tǒng) NFS,NFS也是需要架設(shè)服務(wù)器的; 2、安裝及服務(wù)操作命令 安裝samba程序非常簡單,使用rpm -q samba查看當(dāng)前系統(tǒng)是否已經(jīng)安裝了samba軟件。 如果沒有那就進(jìn)入光盤,rpm -ivh *samba*.rpm即可。 仔細(xì)說下安裝的包: samba-common-3.0.28-0.el5.8 //samba服務(wù)器和客戶端中的最基本文件 samba-3.0.28-0.el5.8 //samba服務(wù)器核心軟件包 system-config-samba-1.2.39-1.el5 //samba圖形配置界面 samba-client-3.0.28-0.el5.8 //samba客戶端軟件 啟動、暫停和停止服務(wù): /etc/init.d/smb start /etc/init.d/smb stop /etc/init.d/smb restart 或 service smb start service smb stop service smb restart 第二節(jié)、由最簡單的一個(gè)例子說起,匿名用戶可讀可寫的實(shí)現(xiàn) 第一步: 更改smb.conf 我們來實(shí)現(xiàn)一個(gè)最簡單的功能,讓所有用戶可以讀寫一個(gè)Samba 服務(wù)器共享的一個(gè)文件夾;我們要改動一下smb.conf ;首先您要備份一下smb.conf文件; [root@localhost ~]# cd /etc/samba [root@localhost samba]# cp smb.conf smb.conf.bak [root@localhost samba]# vi smb.conf 或geidt smb.conf & 然后我們把下面這段寫入smb.conf中: [global] workgroup = WORKGROUP netbios NAME = Liukai server string = Liukai's Samba Server security = share [test] path = /opt/test writeable = yes browseable = yes guest ok = yes 注解: [global]這段是全局配置,是必段寫的。其中有如下的幾行; workgroup 就是Windows中顯示的工作組;在這里我設(shè)置的是WORKGROUP (用大寫); netbios NAME 就是在Windows中顯示出來的計(jì)算機(jī)名; server string 就是Samba服務(wù)器說明,可以自己來定義;這個(gè)不是什么重要的; security 這是驗(yàn)證和登錄方式,這里我們用了share ;驗(yàn)證方式有好多種,這是其中一種;另外一種常用的是user的驗(yàn)證方式;如果用share呢,就是不用設(shè)置用戶和密碼了; [test] 這個(gè)在Windows中顯示出來是共享的目錄; path = 可以設(shè)置要共享的目錄放在哪里; writeable 是否可寫,這里我設(shè)置為可寫; browseable 是否可以瀏覽,可以;可以瀏覽意味著,我們在工作組下能看到共享文件夾。如果您不想顯示出來,那就設(shè)置為 browseable=no,guest ok 匿名用戶以guest身份是登錄; 第二步:建立相應(yīng)目錄并授權(quán) [root@localhost ~]# mkdir -p /opt/test [root@localhost ~]# id nobody uid=99(nobody) gid=99(nobody) groups=99(nobody) [root@localhost ~]# chown -R nobody:nobody /opt/test 注釋:關(guān)于授權(quán)nobody,我們先用id命令查看了nobody用戶的信息,發(fā)現(xiàn)他的用戶組也是nobody,我們要以這個(gè)為準(zhǔn)。有些系統(tǒng)nobody用戶組并非是nobody ; 第三步:啟動服務(wù)器 第四步:訪問Samba 服務(wù)器的共享; 1、在Linux 中您可以用下面的命令來訪問; [root@localhost ~]# smbclient -L //liukai或 smbclient //192.168.0.94/test Password: 注:直接按回車 2、在Windows中,您可以用下面的辦法來訪問; \\liukai 或 \\192.168.0.94 3、說明:如果用了netbiosNAME,就可以用“\\主機(jī)名”來訪問,如果沒用netbiosNAME,就不能用主機(jī)名訪問。 第三節(jié)、簡單的密碼驗(yàn)證服務(wù)器 修改smb.conf文件: security = user guest account = liukai encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd 然后,建立一個(gè)新用戶 useradd liukai passwd liukai 成功后,cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd smbpasswd -a liukai 這就成功地添加了一個(gè)smb用戶。 重啟服務(wù),使用這個(gè)用戶進(jìn)行登錄即可。
上傳時(shí)間: 2015-05-13
上傳用戶:yangkang1192
#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> main(void) { char new_NAME[4], NAME[4]; int new_sn ,sn; printf(" 【注冊】\n\n"); printf("請輸入用戶名(四位英文字母):"); scanf("%s", &new_NAME); printf("請輸入密碼(六位數(shù)字):") ; scanf("%d" ,&new_sn); /*system("PAUSE");*/ system("CLS");/*清屏*/ /*system("PAUSE");*/ printf(" 【登陸】\n\n"); printf("輸入用戶名:"); scanf("%s" , &NAME); if(!strcmp(new_NAME,NAME)){printf("輸入用戶名錯(cuò)誤!"); }/*判斷用戶是否正確*/ printf("輸入密碼:"); scanf("%d" , &sn); if(new_sn != sn){printf("輸入密碼錯(cuò)誤!"); }/*判斷密碼是否正確*/ system("CLS"); printf("恭喜你,登陸成功!\n"); getchar(); return 0; }
標(biāo)簽: C語言
上傳時(shí)間: 2015-12-30
上傳用戶:gjatd1987
springMVC有三個(gè)映射器,如果不定義映射Mapping,那么就會使默認(rèn): l <bean class="org.springframework.web.servlet.handler.BeanNAMEUrlHandlerMapping"></bean> 也就是說:上面這個(gè)定義和不定義都是一樣的。 不定義: <bean id="testController" NAME="/hello.do" class="cn.itcast.controller.TestController"></bean> 直接使用:hello.do來訪問。 <!-- 簡單的url映射處理器 --> l <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property NAME="mappings"> <props> 那么上面的這個(gè)映射配置:表示多個(gè)*.do文件可以訪問多個(gè)Controller或者一個(gè)Controller。 前提是:都必須依賴: <bean id="testController" NAME="/hello.do" class="cn.itcast.controller.TestController"></bean> <!-- /WEB-INF/jsp/index.jsp --> <bean class="org.springframework.web.servl <prop key="/hello1.do">testController</prop> <prop key="/a.do">testController</prop> </props> </property> </bean> et.view.InternalResourceViewResolver"> <property NAME="prefix" value="/WEB-INF/jsp/"></property> <property NAME="suffix" value=".jsp"></property> </bean>
標(biāo)簽: SpringMVC
上傳時(shí)間: 2016-06-03
上傳用戶:hthunder
[開源 綠色軟件] [運(yùn)行環(huán)境 Windows XP/7/8/10] [語言 簡體/繁體/English/Unicode] A cool music player. Powered by Bass and BassVis. 極簡本地音樂播放器,透明、純文本界面。支持輕媒體庫、歌詞、可視化。最小化到托盤,占用資源少,適合邊聽音樂邊工作。 應(yīng)網(wǎng)友要求,加入了Tag編輯、自動切換列表、播放隊(duì)列、鼠標(biāo)手勢、均衡器、音頻設(shè)備選擇、全局音量滾輪(托盤區(qū)域)、字體設(shè)置、極簡模式、鼠標(biāo)穿透、嵌入桌面、簡單布局等功能。 homepage> mcool.appinn.me ==================================================== 音頻格式APE、FLAC、WavPack、MP3、OGG、TTA、TAK、Musepack、AAC、AC3、WMA、Wav、CD、ALAC、Aiff、MOD、CUE ==================================================== 更新歷史: 3336 -2016.3.25 點(diǎn)睛之筆:任意布局(追上foobar2000)。Arbitrary layout (all in one). 3330 -2016.3.10 一體布局之比例調(diào)節(jié)(初具foobar2000風(fēng)貌)。Ratio adjust (all in one). 3308 -2015.11.28 歌詞微調(diào)(在選項(xiàng)>常規(guī)>鼠標(biāo)手勢里設(shè)置)。Adds function of lyrics tuning. 3306 -2015.11.15 電臺模式(整點(diǎn)時(shí)切換歌曲或列表,并非在線音樂),以及多聲卡支持。Adds radio mode, and multi sound card support. 3300 -2015.10.15 完善細(xì)節(jié),修復(fù)切歌卡住bug。完美版。Fixes some bugs. 3280 -2015.8.1 簡單布局功能。Layout (all in one) function. 3260 -2015.6.1 Win10模式。Win10 mode. 3252 -2015.5.10 任務(wù)欄進(jìn)度條。Taskbar progress display. 3236 -2015.4.10 點(diǎn)睛之筆:透明度調(diào)節(jié)。Adds function of transparency tuning. 3232 -2015.3.25 自定義軟件名(請?jiān)趍cool.ini中手動修改)。Adds function of customizing app NAME. 3230 -2015.3.12 Airplay復(fù)刻界面。Airplay interface copy. 3218 -2015.1.20 桌面歌詞。Desktop lyrics. 3216 -2015.1.12 一體化界面(學(xué)習(xí)Foobar2000和豆瓣FM)。All in one interface. 3212 -2015.1.6 新增Winamp音效插件支持(學(xué)習(xí)千千靜聽),以及滾輪穿透功能(學(xué)習(xí)Airplay3)。Adds Winamp DSP plugins support, and adds function of wheel transparent. Winamp音效插件下載:http://uploadgeneration.info/Winamp/www.winamp.com/plugins/dsp-effect/5/top-rated.html 3210 -2014.12.28 重要更新:本地音量調(diào)節(jié)、自定義鼠標(biāo)鍵/手勢。Adds local volume control, and adds fuction of customizing mouse control / gesture. 3208 -2014.11.25 簡化右鍵菜單,常規(guī)項(xiàng)目移到選項(xiàng)窗口。Simplifies the popup menu, moves the general items to option window. 3206 -2014.11.22 新增文本對齊選項(xiàng),重新設(shè)計(jì)導(dǎo)航按鈕。Adds option of text alignment, and redesigns the buttons of playback. 3202 -2014.11.10 新增播放記憶、片段循環(huán)(Hotkey: Ctrl+1/2)和貼邊隱藏功能。Adds functions of playback memory, AB repeat and screen side hide. 3200 -2014.11.5 新增無界面選項(xiàng)(先去掉托盤圖標(biāo),然后Ctrl+Alt+W隱藏界面,Ctrl+Alt+X關(guān)閉)。Adds option of no interface. 3191 -2014.8.26 嵌入桌面。Pins to desktop. 3190 -2014.8.19 音樂管理第一步:列表分組。Playlists grouping. 3186 -2014.8.10 基于列表的分級系統(tǒng)(Hotkey:0..5)。Rating system based on playlist. 3181 -2014.8.1 啟用新圖標(biāo)(由虹吸墨作者BGLL友情制作)。Uses the new icon. 3180 -2014.7.22 新增Win7任務(wù)欄特效。Adds windows 7 taskbar effect. 3166 -2014.6.29 重要更新:自動下載專輯封面(源于歌詞迷)。Downloads album covers from geci.me. 3160 -2014.6.1 重要更新:新增極簡模式,以及OGG/Opus內(nèi)置封面顯示功能。Adds minimalist mode, and adds function of displaying cover embedded in OGG/Opus. 3152 -2014.5.18 添加托盤右鍵菜單,新增MP4/M4A(ALAC)內(nèi)置封面顯示功能。Adds systray popup menu, and adds function of displaying cover embedded in MP4/M4A(ALAC). 3151 -2014.5.1 重新設(shè)計(jì)可視化效果,新增示波器效果。Redesigns visual effects, and adds oscilloscope effect. 3150 -2014.4.20 采用歌詞迷API下載歌詞。Downloads lyrics from geci.me. 3136 -2014.3.30 加入可選的按鈕,以及鼠標(biāo)穿透功能。Adds function of transparent window. 3132 -2014.3.6 簡化界面,向Foobar2K看齊;增加正在播放面板。Simplifies the interface, and adds now playing panel. 3130 -2014.2.26 重要更新:按照專輯分組。Grouping by album. 3120 -2014.2.18 優(yōu)化字體渲染(Windows7/8下)。Optimizes font rendering in Windows 7/8. 3110 -2014.1.26 點(diǎn)睛之筆:自定義字體顏色。Adds function of customizing font color. 3108 -2013.11.16 Last.fm同步功能(請到主頁下載插件)。Last.fm scrobbler support. 3106 -2013.11.8 可回溯的隨機(jī)播放(學(xué)習(xí)Airplay 2)。Random playback can be traced back. 3103 -2013.10.12 優(yōu)化右鍵菜單。Optimizes popup menu. 3102 -2013.9.30 修改滾動條樣式,增加音頻緩沖選項(xiàng)。Modifies style of scroll bar, and adds option of audio buffer length. 3100 -2013.9.10 無邊框設(shè)計(jì);迷你模式也可以不置頂(Hotkey:T)。Borderless designs. 3086 -2013.8.20 增加歌詞面板功能。Adds function of lyrics panel. 3082 -2013.8.08 增加在可視化界面顯示歌詞功能。Adds function of displaying lyrics on visual interface. 3080 -2013.8.01 新增設(shè)置字體功能,恢復(fù)簡單的自動關(guān)機(jī)功能。Adds function of setting font, and re-adds simple function of auto shutdown. 3060 -2013.6.26 修復(fù)在迷你模式停止響應(yīng)的Bug,去掉自動關(guān)機(jī)、歌詞調(diào)整功能。Fixes bug of stop responding in mini mode, and removes functions of auto shutdown and lyrics trimming. 3050 -2013.5.23 增加手勢功能。Adds gesture function. 3030 -2013.3.10 增加Aero磨砂玻璃效果[如需源碼請聯(lián)系我],XP/Win7/8無差別顯示,按Insert鍵開啟。Adds aero glass effect. 3020 -2013.2.23 增加簡易Tag編輯功能(選中并單擊即可,相當(dāng)于資源管理器中的重命名,按照[歌手 - 歌名][專輯]格式進(jìn)行編輯)。Adds function of editing audio tags (select and click, edit with [artist - title][album] format). 3010 -2013.1.23 應(yīng)網(wǎng)友要求,加入讀取內(nèi)嵌CUE、歌詞及專輯封面功能。Adds function of reading CUE, LRC and album cover built in media. 3002 -2012.11.03 無按鈕設(shè)計(jì);微調(diào)進(jìn)度條尺寸。Buttonless design; modifies the size of the progress bar. 3001 -2012.10.15 重要改進(jìn),界面即按鈕:單擊 - 播放/暫停,按住 - 前進(jìn)。Important update, the interface is a button: Click - Play/Pause, Hold Down - Next. 3000 -2012.9.28 增加Win8模式。Adds Win8 mode option. 2982 -2012.8.26 在Win8下使用微軟雅黑字體。Uses Microsoft YaHei font in Windows 8 CHS. 2981 -2012.8.20 視頻以插件提供(請到主頁下載),增加單曲循環(huán)功能。Adds function of repeat track. 2980 -2012.7.26 簡化代碼,去掉視頻和MIDI支持。Removes the video and MIDI support. 2970 -2012.7.20 增加媒體信息顯示功能。Adds function of displaying media info. 2960 -2012.6.28 增加專輯封面顯示功能(Hotkey:Ins)。Adds function of displaying album cover. 2956 -2012.6.01 再次簡化界面。Simplifies the interface again. 2952 -2012.4.28 增加音頻設(shè)備選擇功能:DS、ASIO、WASAPI。Adds function of selecting playback device. 2950 -2012.3.30 *增加滾輪調(diào)節(jié)音量功能(在托盤,中鍵靜音)和媒體鍵支持。Adds function of setting volume by mouse wheel (over systray, middle click to mute), and adds multimedia keys support. 2936 -2012.3.17 微調(diào)界面,修復(fù)物理刪除失效的BUG。Fine-tunes the interface, and restores the physical delete function. 2930 -2012.2.27 增加TAK格式支持。Adds TAK format support. 2923 -2012.2.12 緊急修復(fù)上一版出現(xiàn)的字體模糊BUG(Vista/Win7下),增加在任務(wù)欄顯/隱圖標(biāo)功能(Ctrl+T)。Fixes font vague bug for Vista/Win7, and adds showing/hiding icon on taskbar function. 2920 -2012.2.08 微調(diào)界面,優(yōu)化CPU占用(啟用背景圖片時(shí))。Fine-tunes the interface, and optimizes CPU utilization (while enable background image). 2912 -2012.1.12 增加播放隊(duì)列功能。Adds playback queue function. 2910 -2011.12.25 改進(jìn)迷你模式,增加查找功能。Improves mini mode, and adds find function. *注:此功能對殺毒軟件過敏,開啟方法:按F1進(jìn)入選項(xiàng),勾選全局快捷鍵。The feature is allergic to the anti-virus software.
上傳時(shí)間: 2016-06-10
上傳用戶:fanghua
altium15安裝與破解 1.運(yùn)行AD15KeyGen,點(diǎn)擊“打開模板”,加載license.ini,如想修改注冊名,只需修改: TransactorNAME=Your NAME 其中Your NAME用你自己的名字替換,其它參數(shù)在單機(jī)版的情況下無需修改; 2.點(diǎn)擊“生成協(xié)議”,保存生成的alf文件(文件名任意,如“jack ”),并將其放到你的安裝目錄下; 3.將patch.exe放到你的安裝目錄下,運(yùn)行patch,對安裝目錄下的dxp.exe文件補(bǔ)丁,注意運(yùn)行破解時(shí)軟件沒有運(yùn)行; 4.啟動DXP,運(yùn)行菜單DXP->My Account,點(diǎn)擊Add Standalone License file,加載前面生成的license(.alf)文件后即能正常使用了。 注意: 1.局域網(wǎng)內(nèi)用同一license不再提示沖突 2.僅供學(xué)習(xí)研究使用,勿用于非法用途。
上傳時(shí)間: 2016-06-11
上傳用戶:newvision
?陋寧?: 1、頓契setuprlm32.exe(???角winxp,?塘?鹿??逃?駕頓契,鹿茍伽?!); 2、??rlm.exe?C:\Program Files\Tecplot\RLM匡??茍(乖?溝固角win7sp1??),??競?覩??; 3、??tecplotlm.lic?C:\Program Files\Tecplot\RLM匡??茍; 4、?陋寮?埼setup360_win32.exe; 5、頓契C:\Program Files\Tecplot\RLM匡??茍rlm.exe,?狼??; 6、頓契?埼Tecplot 360 2013R1,痰use Network License,瞳License Server NAME?茍?渴????炬??(塘????炬?,?橄昑?鹿??,??乖?chen-PC)。 enjoy!
上傳時(shí)間: 2016-06-13
上傳用戶:onetwo2008
運(yùn)行在Windows NT/2000/XP 下多線程方式對指定IP段(指定主機(jī)),或主機(jī)列表,進(jìn)行漏洞、弱口令賬號、匿名用戶檢測的工具,掃描項(xiàng)目包括NAME、port、ftp、ssh、telnet、smtp、finger、iis、cgi、pop、rpc、ipc、imap、mssql、mysql、cisco、plugin...
上傳時(shí)間: 2016-06-30
上傳用戶:siyecao
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define NULL 0 #define MaxSize 30 typedef struct athletestruct /*運(yùn)動員*/ { char NAME[20]; int score; /*分?jǐn)?shù)*/ int range; /**/ int item; /*項(xiàng)目*/ }ATH; typedef struct schoolstruct /*學(xué)校*/ { int count; /*編號*/ int serial; /**/ int menscore; /*男選手分?jǐn)?shù)*/ int womenscore; /*女選手分?jǐn)?shù)*/ int totalscore; /*總分*/ ATH athlete[MaxSize]; /**/ struct schoolstruct *next; }SCH; int nsc,msp,wsp; int ntsp; int i,j; int overgame; int serial,range; int n; SCH *head,*pfirst,*psecond; int *phead=NULL,*pafirst=NULL,*pasecond=NULL; void create(); void input () { char answer; head = (SCH *)malloc(sizeof(SCH)); /**/ head->next = NULL; pfirst = head; answer = 'y'; while ( answer == 'y' ) { Is_Game_DoMain: printf("\nGET Top 5 when odd\nGET Top 3 when even"); printf("\n輸入運(yùn)動項(xiàng)目序號 (x<=%d):",ntsp); scanf("%d",pafirst); overgame = *pafirst; if ( pafirst != phead ) { for ( pasecond = phead ; pasecond < pafirst ; pasecond ++ ) { if ( overgame == *pasecond ) { printf("\n這個(gè)項(xiàng)目已經(jīng)存在請選擇其他的數(shù)字\n"); goto Is_Game_DoMain; } } } pafirst = pafirst + 1; if ( overgame > ntsp ) { printf("\n項(xiàng)目不存在"); printf("\n請重新輸入"); goto Is_Game_DoMain; } switch ( overgame%2 ) { case 0: n = 3;break; case 1: n = 5;break; } for ( i = 1 ; i <= n ; i++ ) { Is_Serial_DoMain: printf("\n輸入序號 of the NO.%d (0<x<=%d): ",i,nsc); scanf("%d",&serial); if ( serial > nsc ) { printf("\n超過學(xué)校數(shù)目,請重新輸入"); goto Is_Serial_DoMain; } if ( head->next == NULL ) { create(); } psecond = head->next ; while ( psecond != NULL ) { if ( psecond->serial == serial ) { pfirst = psecond; pfirst->count = pfirst->count + 1; goto Store_Data; } else { psecond = psecond->next; } } create(); Store_Data: pfirst->athlete[pfirst->count].item = overgame; pfirst->athlete[pfirst->count].range = i; pfirst->serial = serial; printf("Input NAME:) : "); scanf("%s",pfirst->athlete[pfirst->count].NAME); } printf("\n繼續(xù)輸入運(yùn)動項(xiàng)目(y&n)?"); answer = getchar(); printf("\n"); } } void calculate() /**/ { pfirst = head->next; while ( pfirst->next != NULL ) { for (i=1;i<=pfirst->count;i++) { if ( pfirst->athlete[i].item % 2 == 0 ) { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 5;break; case 2:pfirst->athlete[i].score = 3;break; case 3:pfirst->athlete[i].score = 2;break; } } else { switch (pfirst->athlete[i].range) { case 1:pfirst->athlete[i].score = 7;break; case 2:pfirst->athlete[i].score = 5;break; case 3:pfirst->athlete[i].score = 3;break; case 4:pfirst->athlete[i].score = 2;break; case 5:pfirst->athlete[i].score = 1;break; } } if ( pfirst->athlete[i].item <=msp ) { pfirst->menscore = pfirst->menscore + pfirst->athlete[i].score; } else { pfirst->womenscore = pfirst->womenscore + pfirst->athlete[i].score; } } pfirst->totalscore = pfirst->menscore + pfirst->womenscore; pfirst = pfirst->next; } } void output() { pfirst = head->next; psecond = head->next; while ( pfirst->next != NULL ) { // clrscr(); printf("\n第%d號學(xué)校的結(jié)果成績:",pfirst->serial); printf("\n\n項(xiàng)目的數(shù)目\t學(xué)校的名字\t分?jǐn)?shù)"); for (i=1;i<=ntsp;i++) { for (j=1;j<=pfirst->count;j++) { if ( pfirst->athlete[j].item == i ) { printf("\n %d\t\t\t\t\t\t%s\n %d",i,pfirst->athlete[j].NAME,pfirst->athlete[j].score);break; } } } printf("\n\n\n\t\t\t\t\t\t按任意建 進(jìn)入下一頁"); getchar(); pfirst = pfirst->next; } // clrscr(); printf("\n運(yùn)動會結(jié)果:\n\n學(xué)校編號\t男運(yùn)動員成績\t女運(yùn)動員成績\t總分"); pfirst = head->next; while ( pfirst->next != NULL ) { printf("\n %d\t\t %d\t\t %d\t\t %d",pfirst->serial,pfirst->menscore,pfirst->womenscore,pfirst->totalscore); pfirst = pfirst->next; } printf("\n\n\n\t\t\t\t\t\t\t按任意建結(jié)束"); getchar(); } void create() { pfirst = (struct schoolstruct *)malloc(sizeof(struct schoolstruct)); pfirst->next = head->next ; head->next = pfirst ; pfirst->count = 1; pfirst->menscore = 0; pfirst->womenscore = 0; pfirst->totalscore = 0; } void Save() {FILE *fp; if((fp = fopen("school.dat","wb"))==NULL) {printf("can't open school.dat\n"); fclose(fp); return; } fwrite(pfirst,sizeof(SCH),10,fp); fclose(fp); printf("文件已經(jīng)成功保存\n"); } void main() { system("cls"); printf("\n\t\t\t 運(yùn)動會分?jǐn)?shù)統(tǒng)計(jì)\n"); printf("輸入學(xué)校數(shù)目 (x>= 5):"); scanf("%d",&nsc); printf("輸入男選手的項(xiàng)目(x<=20):"); scanf("%d",&msp); printf("輸入女選手項(xiàng)目(<=20):"); scanf("%d",&wsp); ntsp = msp + wsp; phead = (int *)calloc(ntsp,sizeof(int)); pafirst = phead; pasecond = phead; input(); calculate(); output(); Save(); }
標(biāo)簽: 源代碼
上傳時(shí)間: 2016-12-28
上傳用戶:150501
#include <iostream.h> #include <string.h> #include <iomanip.h> #include "Stud.h" Stud::Stud(){} char *Stud::getno() //獲取學(xué)號 { return no; } char *Stud::getNAME() //獲取姓名 { return NAME; } char *Stud::getsex() //獲取性別 { return sex; } char *Stud::getminzu() //獲取民族 { return minzu; } char *Stud::getaddress() //獲取出生地 { return address; } char *Stud::getbirth() //獲取出生年月 { return birth; } int Stud::gettag() //獲取姓名 { return tag; } void Stud::changeno(char n[]) //設(shè)置學(xué)號 { strcpy(no,n); } void Stud::changeNAME(char na[]) //設(shè)置姓名 { strcpy(NAME,na); } void Stud::changesex(char s[]) //設(shè)置性別 { strcpy(sex,s); } void Stud::changeminzu(char m[]) //設(shè)置民族 { strcpy(minzu,m); } void Stud::changeaddress(char a[]) //設(shè)置出生地 { strcpy(address,a); } void Stud::changebirth(char b[]) //設(shè)置出生年月 { strcpy(birth,b); } void Stud::addstudent(char *rn,char *rna) //增加學(xué)生 { strcpy(no,rn); strcpy(NAME,rna); } void Stud::addstudent(char *rn,char *rna,char *rs,char *rm,char *ra,char *rb) //增加學(xué)生 { tag=0; strcpy(no,rn); strcpy(NAME,rna); strcpy(sex,rs); strcpy(minzu,rm); strcpy(address,ra); strcpy(birth,rb); } void Stud::delstud() //設(shè)置刪除標(biāo)記 { tag=1; } void Stud::disp() //輸出學(xué)生信息 { cout<<setw(15)<<no<<setw(10)<<NAME<<setw(10)<<sex<<setw(10)<<minzu<<setw(10)<<address<<setw(10)<<birth<<endl; } void Stud::display() //輸出學(xué)生信息 { cout<<setw(15)<<no<<setw(10)<<NAME; }
標(biāo)簽: 學(xué)生
上傳時(shí)間: 2016-12-29
上傳用戶:767483511
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1