Update main.rs
Added ncurses function
This commit is contained in:
parent
ba1b7ec819
commit
461ca2a884
15
src/main.rs
15
src/main.rs
@ -1,7 +1,7 @@
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use std::env;
|
||||
use ncurses;
|
||||
extern crate ncurses;
|
||||
|
||||
fn main() -> std::io::Result<()> {
|
||||
let args: Vec<String> = env::args().collect();
|
||||
@ -13,5 +13,18 @@ fn main() -> std::io::Result<()> {
|
||||
file.read_to_string(&mut contents).expect("unreadable file.");
|
||||
|
||||
println!("{}", contents);
|
||||
screen();
|
||||
Ok(())
|
||||
|
||||
|
||||
}
|
||||
|
||||
fn screen(){
|
||||
|
||||
ncurses::initscr();
|
||||
ncurses::printw("Hello World!");
|
||||
ncurses::refresh();
|
||||
ncurses::getch();
|
||||
ncurses::endwin();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user