I typed my first code in rust. The helloworld. But I got an error when I tried to run it.
fn main() {
println!("Hello world");
}
I tried to run using './hellworld.rs' But it showed,
syntax error near unexpected token `('
`fn main() {'
I was using powershell. But used the wrong command ./helloworld.rs
Instead I tried ./helloworld
and ./helloworld.exe
. Both worked.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With