Aizawl ah hian Computer zirna atam ta hle mai a. Engchin nge an in zirtir tih chu hre vek lo mah ila, Higher chin ah Computer Science Subject pakhat anga lak theihna pawh atam ta hle mai. Tin, Private leh Government Institute pawh an kat ve ta nawk mai.
A bik in Programing lama tui tak, la zir ve tan mek School naupang leh zirlai dangah tam tak kan awm ka ring a. An tana tangkai tura ka hriat avang leh midang athiam zawk te cho chhuah nan tlem azawng ka han thai lang ve dawn teh ang. India rama Computer Science zirna School ah chuan atlangpuiin, C/C++ hi a bul tannan a hman a la ni deuh vek a. Kan zir hmasak ber leh an dah pawimawh tak pakhat chu a la ni reng dawn bawk ni in a lang.
Atan nan TurboC/C++, Windows platform atangin kan tan tlangpui ni in alang a. Ka rawn chhawp chhuah duh leh zirlai te (Beginner) ka kawh hmuh duh zawk chu Linux hian Windows platform atang ai chuan zir tur leh hriattur min pe thui thei zawk in ka hria. Linux Distros zingah chuan Ubuntu hi beginner te tan a an kawh hmuh hnem ber leh hriat awlsam, hman nuam ber a Proffessional tam tak ten an sawi a ni.
C/C++ programming on LINUX
C code Windows/Dos a kan ziah kha ANSI C code anih chhung chuan Linux ah pawh a la ni reng a, IDE (Turbo C/C++) kha kan hman atul tawh lo a, a aiah text editor pangai Linux in a ken engpawh kha kan hmang mai thei zawk a ni. Gedit emaw Kwrite emaw hi chu Linux install tirh ah atel ngei ngei tur a ni. Windows kan install tirha Notepad a tel ngei ang hian. Mahse, Library function pahnih conio.h leh graphic.h te hi ANSI standard an nih ve loh avangin Linux ah chuan a hman ve theih dawn loh tih hriat lawk a tha. Heng pahnih aiah hian ncurses.h/curses.h a hranpa a download a, install a ngai ve a ni. (https://linux.softpedia.com/get/Programming/Libraries/Ncurses-6097.shtml). C compiler kan hman tur chu Linux ah chuan GCC a ni. ( https://en.wikipedia.org/wiki/.GNU_Compiler_Collection).
A hmasa berah chuan, Terminal han hawng la, ahnuai a mi ang hian han chhu teh:
$ gcc
gcc: no input files
gcc:no input files tih a lo lang chuan, gcc compiler install sa diam a ni tih na. “Command not found” tih ang reng a nih chuan , gcc chu package manager hmanga i install angai tih na a ni ang. Gcc compiler tih loh ah chuan C standard library glibc i neih tel ngei ngei a ngai bawk.
A hnuai a mi ang hi han chhu lut leh teh:
$ locate glibc
glibc a install chuan directory structure ” /foo/bar/glibc” tih emaw a lo lang ang. A nih loh chuan glibc install angai tih na ani ang.
Le tunah chuan gedit han hawng la, ahnuai a code hi han chhu/paste lut teh:
#include <time.h> #include <curses.h> int current_getch; int doloop = 1; static WINDOW *mainwnd; static WINDOW *screen; WINDOW *my_win; int now_sec, now_min, now_hour, now_day, now_wday, now_month, now_year; time_t now; struct tm *now_tm; void screen_init(void) { mainwnd = initscr(); noecho(); cbreak(); nodelay(mainwnd, TRUE); refresh(); // 1) wrefresh(mainwnd); screen = newwin(13, 27, 1, 1); box(screen, ACS_VLINE, ACS_HLINE); } static void update_display(void) { curs_set(0); mvwprintw(screen,1,1,"-------- HEADER --------"); mvwprintw(screen,3,6,"TIME: %d:%d:%d", now_hour, now_min, now_sec); mvwprintw(screen,5,6,"DATE: %d-%d-%d", now_day, now_month, now_year); mvwprintw(screen,7,6,"PRESS q TO END"); mvwprintw(screen,10,1,"-------- FOOTER --------"); wrefresh(screen); refresh(); } void screen_end(void) { endwin(); } void maketime(void) { // Get the current date/time now = time (NULL); now_tm = localtime (&now); now_sec = now_tm->tm_sec; now_min = now_tm->tm_min; now_hour = now_tm->tm_hour; now_day = now_tm->tm_mday; now_wday = now_tm->tm_wday; now_month = now_tm->tm_mon + 1; now_year = now_tm->tm_year + 1900; } int main(void) { screen_init(); while (doloop) { current_getch = getch(); if (current_getch == 113) { doloop = 0; } maketime(); update_display(); sleep(1); } screen_end(); printf("TEST ENDS\n"); return 0; }
Home folder ah Directory thar siam la, tah chuan curses.c tih hmingin han save la. Terminal ah kir leh la, cd command hmangin i save na ah han lut la:
$ gcc curses.c tih han chhu teh.
error leh bug tam tak arawn pe ang, ncurses library files i la load lo tihna a ni a. Ncurses library files i download (tawh chuan) kha install phawt la, tichuan terminalah hetiang hian han type leh la:
$ gcc -g -Wall -l ncurses -o curses curses.c
Error engmah (a awm toh lovang) a awm tawh loh chuan ncurses library pawh a dik tawh tihna a ni a, a hnuai ami ang hian han type leh la:
$ ./curses Output a rawn pe tawh ang. Mahse hei hi chu ncurses header file hmang ho compile dan tur ani. ncurses header file hman na ni lem lo ah chuan, gcc <filename.c> hmangin a compile mai theih a ni.
Le C simple source code zirlai bu a arawn pek te kha, a chung a kan sawi ang chiah khian han chhu leh la,gcc hmang hian han compile la, (conio.h leh graphic.h) ho hmanna erawh chu a theih ve loh tih hriat a tha. Tin, ncurses.h a thlak ngawt in awmzia a nei lo bawk.Ka sample rawn pek leh tih dan tur ka rawn sawi te khi, a tih dan awm chhun tihna a ni lo a, tin, a nih phung leh a kal hmang kim tak in ka rawn tar lang vek kher lo a, zirlai te tan in haichhuah leh tih dan kawng inkawh hmuhna mai a ni .
Similar Posts:
- One heck of a Night
- Linux Operating System Pendrive atanga install dan:
- A hria in awm mial em aw??
- Peanut Linux 9.0
- Windows7 i Install thar kha i Activate em?
October 9th, 2010 at 8:31 am
Chhiar ang..Bengvarthlak e… L1nux hi ka khawih ve nual tawh a, mahse khawih tam a ngai khawp mai.. command hriat reng a har bawk nen.. nal tur chuan hrat ve deuh a ngai.
Desktop PC ka hman lai chuan L1nux hi ka install tel ve ziah a, Red Hat te, Fedora Core te bakah Mandrake te pawh lung an ti leng mai mai..
Post tha tak a ni.. ka vote e.
[Report abuse]
October 9th, 2010 at 8:33 am
A lo zaphenath leh ta!
[Report abuse]
October 9th, 2010 at 8:35 am
programming in c chu ka zir ve ngei kha, a bak chu ka hre lem hleilo
[Report abuse]
October 9th, 2010 at 8:55 am
#include stdio.h
#include conio.h
/* greater than leh less than sign dah chuan a lang thei miah leu */
void main()
{
printf(”Zephenath the 1st”);
getch();
}
Output: Zephenath the 1st ve deuh ziah.
Good post, i sample khi a awmzia hrilhfiah law law la tha tur!
[Report abuse]
October 9th, 2010 at 9:10 am
@^-||RaLtE||-^: hahhaa Output chu leh.
good simple C program.
[Report abuse]
October 9th, 2010 at 9:11 am
Tha dawn khawp mai
[Report abuse]
October 9th, 2010 at 9:13 am
Zephenath, i f1rst dan khi a 7hing 1utuk! Ka hriat loh lam tak a ni. Han sawi ho chur2 teh u…
[Report abuse]
October 9th, 2010 at 9:15 am
@kawlhawk: kei chu th1ng deuhin ka 1st mai tang e..
Sawi vak tur pawh a awm lo! A hrethiam leh tui mi tan a bengvarthlakin a tha e..tih mai loh chu.. ehhehee
Linux khawih tirh chuan Live CD te khan kan han ti ve lauh2 a, chutah Windows atangin Hard disk partition siamin (last drive) kan han tiruak a, Linux kha kan lnstall ve thin a. Operating System 2 kan dual boot a nih chu… games khelh a nuam phian, tin, internet lamah pawh security a tha zawk. Web/network server atan LINUX a lar mah zawk..
[Report abuse]
October 9th, 2010 at 9:20 am
@Zephenath: kawlhawka hi kan program ve dawn mi, thing a ti si che a? lol.
[Report abuse]
October 9th, 2010 at 9:24 am
@^-||RaLtE||-^: Han program teh.. output chhuak theih hlek lo khan Error a pek loh leh Debugging hrep ngai turin aw…..
[Report abuse]
October 9th, 2010 at 9:30 am
Ka hrethiam chiahlo mahse post tangkai tak a ni
[Report abuse]
October 9th, 2010 at 9:31 am
Vitamin_C ka ei chak e..
[Report abuse]
October 9th, 2010 at 9:42 am
Ka hul.
[Report abuse]
October 9th, 2010 at 9:46 am
Linux/Ubuntu… hrethiam ve nei nuaihlo. Hre ve chak viau na a, a ler atang chuan tihngaihna awm lo.
Blogger Tutorial rawn ziak teh u. A sei/tam pawhin serial in. Google chuan hmuh tur tam mahse tuipui ral tawng hian duhlian tawng a tluk zolo(ka tan) OT thui em aw ?
[Report abuse]
October 9th, 2010 at 9:53 am
@SeynMizo, diksawnari nen incchawp top mai rawh. NOI
[Report abuse]
October 9th, 2010 at 9:59 am
@15 : i blog ah lo beisei leh top mai ila ??
Dictionary pohin a hre seng lovang. Entirnan, Blogger Template installation and Edit..etc.
Tutorial chi hrang2 video te nen ka bei ve ngial..ka la buai tluang khawp mai. Nuam erawh ka ti phian.
[Report abuse]
October 9th, 2010 at 10:04 am
nia, template code awm sa modify hi a then awlsam taka a theih laiin a then erawh error awm tho zel… Ka peih tak thut leh ka l,a rawn ziak ang. Ziah ka chakna leh ziah ka peih lohna ala inchen rih. lol
[Report abuse]
October 9th, 2010 at 10:08 am
I chakna alo pun zel theih nan……. Hriselna tha neiin lo dam zel ang che.
[Report abuse]
October 9th, 2010 at 10:11 am
Thanks #18
[Report abuse]
October 9th, 2010 at 10:21 am
Ka chhiar chhuak vek. Ka hlawkpui chai love. Thiamloh em vang!!!
[Report abuse]
October 9th, 2010 at 10:37 am
Linux ah pawh ubuntu hi ka ngaina ve ringawt a, a thiam phei chu ka thiam teh vaklo. hihi
Ubuntu Generation:
Warty Warthog
Hoary Hedgehog
Breezy Badger
Dapper Drake
Edgy Eft
Feisty Fawn
Gutsy Gibbon
Hardy Heron
Intrepid Ibex
Jaunty Jackalope
Karmic Koala
Lucid Lynx
October-a an release leh tur
Maverick Meerkat
An hming hi comics vela Hero ho hming ni awmtak ani
[Report abuse]
October 9th, 2010 at 10:39 am
gedit aichuan vim hi hman a nuam zawk lo maw…?
[Report abuse]
October 9th, 2010 at 10:42 am
Windows XP ka hre ve deuh
[Report abuse]
October 9th, 2010 at 11:04 am
C/C++ ah hian ka la buai tawk emai keizawng..ka hul e..
[Report abuse]
October 9th, 2010 at 12:08 pm
nice post, debugging pawh rawn post leh law law teh.
[Report abuse]
October 9th, 2010 at 1:05 pm
Atom tih te a awm in ka hria, linux te. Ka hriat loh em em lam a ni tlat. Sawi vak tur pawh ka hre lo. Kompiutar lamah chuan ‘html’ in tih emawni kha ka zir ve tawh a ni mai. ka thiam chuang hlei lova
[Report abuse]
October 9th, 2010 at 1:26 pm
heichu nakin ah uluk tawkin k chhiar ag…rn bei ler mah mah em awww.. ka ti
[Report abuse]
October 9th, 2010 at 2:00 pm
Informative khawp mai. A title Linux vs Windows ai chuan curses programming in Linux tih a inhmeh hmel te ka lo ti mai mai. conio.h chu Linux-a ncurses hmang thova an port na https://www.boutell.com/lsm/lsmbyid.cgi/001132 leh https://sourceforge.net/projects/linux-conioh/ ah te hian a awm.
Turbo C graphics.h pawh kha bressenham’s algorithm vel ziah nan khan Linux ah chuan a buaithlak ve thin. Net ah chuan kual deuhva hman dan chu a awm. Chutianga buai vak kher lohva Linux-a turbo C la hman duh hram chuan dosbox khan a awlsam phian.
[Report abuse]
October 9th, 2010 at 4:54 pm
Nia, C/C++ hi in ti lar leh lutuk maaaai…lol
Comments tarlan rei a remlo tlats…. !!
[Report abuse]
October 9th, 2010 at 4:57 pm
#29 enge i ziah thin a? hehehehe
[Report abuse]
October 9th, 2010 at 5:11 pm
@ozima #30, i tisual, ziah i tipalh. ziak tihtur… I pu muantea’n a hau lovang che maw?
[Report abuse]
October 9th, 2010 at 5:12 pm
@#30 :- Ziah tur chu tam khawp mai…lolzz, Software programming nan ka hmang a.. Abikin System software lampang programmed nan te Formula translate nan te tha khups mai..
[Report abuse]
October 9th, 2010 at 5:16 pm
porn film te hi ziah theih se a subtitle tel thlap in
[Report abuse]
October 9th, 2010 at 5:44 pm
@CyberThug: ilo influencial phian maw ni aw ka ti hial!!! When in Rome do as the romans do .
#32: good job, C/C++ pawh har tih nak lai a, fortran/pascal tih vel a code chu har leh zual awm.
[Report abuse]
October 9th, 2010 at 6:38 pm
Post tha tak a ni….
Linux hi open source a nia…zir nan chuan a tha viau mahce command vel neuh2 tam ve pangai hriat tur a tam a vang erawh chuan ka ning hle kei chuan heheh….
Windows a software install chawp ngai tam tak hi a keng tel a chu2 a thatna pa1 pawh a ni..
Entirnan…Windows ah PhP hmanga thil i tih dawn chuan Apache Server emaw i install phawt a ngai a..ce Linux ah erawh a kengtel chutiang chu tam tak a awm a ni..
A post tu rawn sawi ang khian C/C++ Compiler tha tak GCC pawh a kengtel nghal a…khawih peih chuan inzir nan chuan a tha khawp mai…
Ce windows chu home use ah chuan ka la duh zawk tho2 kei chu…
[Report abuse]
October 9th, 2010 at 7:59 pm
hman deuh kahn ka hmang ve chhin aa buaithlak khawp mai command hriat velo chuan.
[Report abuse]
October 9th, 2010 at 8:54 pm
Linux distro ah chuan Debian ka hmang thin shell programming tui ve lai kha chuan. Security lampangah lah a tha bawk entirnan Backtrack 4 etc. Maya particle and dynamic khawih nan a tha khawp mai windows ai chuan a crash khat deuh tih te hi kan sawi ve mai mai teh ang.
DOS ai chuan UNIX hi a lo tha zawk khawp mai
[Report abuse]
October 9th, 2010 at 9:08 pm
^-||RaLtE||-^ hi engtinnge maw ilo hriat bik chu ni le..lolz. Kan hriat loh hretupa i ni ringawt mai.
Tin, Post tupa pawh ititha e.
[Report abuse]
October 9th, 2010 at 9:52 pm
A Post tu “Mythong” pawh hi programming lamah chuan a hre ril viau tih a hriat thei mai. Article i thawh tha lutuk..!!, Programming lamah hian tan i la thar teh ang u. Mi fa te tih theih ang chu kan ti ve thei tur a ni ringawt mai a ni… tan lak a ngai a ni. Nia, Linux Operating System leh Windows XP hi a fuh ber pawl a la ni rih a, ATM Machine ah pawh hian Linux leh Windows XP an hmang a, Windows Vista,Windows 7 an hmang ngailo…!!
[Report abuse]
October 10th, 2010 at 2:31 am
In va ril hlawm ve aw..windows hi chu 3.1 atang khan ka lo khawih ve tawh. Prog leh language ah chuan illiterate thung. Tang teh u, naupang deuh ho kha.
[Report abuse]
October 11th, 2010 at 11:35 am
A bengvarthlak hle mai.
c:\> copy con misual.txt
Zephenath, the 1st
Control+ Z
Hei command hi kan zir hmasak ber.
[Report abuse]