tanzadeh7
سه شنبه 14 مرداد 1393, 21:35 عصر
سلام من وقتی این کد رو میخوام کاپایل کنم این ارپ رو میده
این کد
#include <iostream>
#include <unistd.h>
using namespace std;
int main() {
std::cout << "rebooting system.";
sleep(1);
std::cout << "rebooting system..";
sleep(1);
std::cout << "rebooting system...";
if (a == "reboot") {
asm
{
jmp reboot
reboot :
mov ax, 0
int 16h
mov ax, 0
int 19h
}
}
return 0;
}
و ارور
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/tanzadeh/NetBeansProjects/operating system'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/operating_system
make[2]: Entering directory `/home/tanzadeh/NetBeansProjects/operating system'
mkdir -p build/Debug/GNU-Linux-x86
rm -f "build/Debug/GNU-Linux-x86/Main.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/GNU-Linux-x86/Main.o.d" -o build/Debug/GNU-Linux-x86/Main.o Main.cpp
Main.cpp:15:29: error: invalid suffix "h" on integer constant
int 16h
^
Main.cpp:17:29: error: invalid suffix "h" on integer constant
int 19h
^
Main.cpp: In function ‘int main()’:
Main.cpp:7:11: error: ‘gets’ was not declared in this scope
gets(a);
^
Main.cpp:10:13: error: expected ‘(’ before ‘{’ token
{
^
Main.cpp:11:17: error: ‘jmp’ was not declared in this scope
jmp reboot
^
Main.cpp:11:21: error: expected ‘;’ before ‘reboot’
jmp reboot
^
make[2]: *** [build/Debug/GNU-Linux-x86/Main.o] Error 1
make[2]: Leaving directory `/home/tanzadeh/NetBeansProjects/operating system'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/tanzadeh/NetBeansProjects/operating system'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 784ms)
این کد
#include <iostream>
#include <unistd.h>
using namespace std;
int main() {
std::cout << "rebooting system.";
sleep(1);
std::cout << "rebooting system..";
sleep(1);
std::cout << "rebooting system...";
if (a == "reboot") {
asm
{
jmp reboot
reboot :
mov ax, 0
int 16h
mov ax, 0
int 19h
}
}
return 0;
}
و ارور
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/tanzadeh/NetBeansProjects/operating system'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Linux-x86/operating_system
make[2]: Entering directory `/home/tanzadeh/NetBeansProjects/operating system'
mkdir -p build/Debug/GNU-Linux-x86
rm -f "build/Debug/GNU-Linux-x86/Main.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/GNU-Linux-x86/Main.o.d" -o build/Debug/GNU-Linux-x86/Main.o Main.cpp
Main.cpp:15:29: error: invalid suffix "h" on integer constant
int 16h
^
Main.cpp:17:29: error: invalid suffix "h" on integer constant
int 19h
^
Main.cpp: In function ‘int main()’:
Main.cpp:7:11: error: ‘gets’ was not declared in this scope
gets(a);
^
Main.cpp:10:13: error: expected ‘(’ before ‘{’ token
{
^
Main.cpp:11:17: error: ‘jmp’ was not declared in this scope
jmp reboot
^
Main.cpp:11:21: error: expected ‘;’ before ‘reboot’
jmp reboot
^
make[2]: *** [build/Debug/GNU-Linux-x86/Main.o] Error 1
make[2]: Leaving directory `/home/tanzadeh/NetBeansProjects/operating system'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/tanzadeh/NetBeansProjects/operating system'
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 784ms)