Search Results

Search found 4 results on 1 pages for 'yurib'.

Page 1/1 | 1 

  • c code compiles but is not executed in kubuntu

    - by yurib
    I'm running kubuntu 9.10 in VirtualBox, i wrote the simplest "hello world" program in C, the code compiles, i ran it through a debugger and it seems to run fine. the only problem is nothing gets actually printed to the console... any ideas ? heres the code: #include <stdlib.h> int main (int argc, char **argv) { printf("hello world"); return 0; }

    Read the article

  • writing to a file in nasm using system calls

    - by yurib
    As part of an assignment I'm supposed to write to a file using system calls. Everything works fine except when I try to open the file in gedit (linux), it says it can't identify the character encoding. Notepad (on windows) opens the file just fine. Why doesn't it work on linux ? here's the code: section .text global _start _start: mov EAX, 8 mov EBX, filename mov ECX, 0700 int 0x80 mov EBX, EAX mov EAX, 4 mov ECX, text mov EDX, textlen int 0x80 mov EAX, 6 int 0x80 mov eax, 1 int 0x80 section .data filename db "./output.txt", 0 text db "hello world", 0 textlen equ $ - text thanks :)

    Read the article

  • need a virtual template member workaround

    - by yurib
    Hello, I need to write a program implementing the visitor design pattern. The problem is that the base visitor class is a template class. This means that BaseVisited::accept() takes a template class as a parameter and since it uses 'this' and i need 'this' to point to the correct runtime instance of the object, it also needs to be virtual. I'd like to know if there's any way around this problem. template <typename T> class BaseVisitor { public: BaseVisitor(); T visit(BaseVisited *visited); virtual ~BaseVisitor(); } class BaseVisited { BaseVisited(); template <typename T> virtual void accept(BaseVisitor<T> *visitor) { visitor->visit(this); }; // problem virtual ~BaseVisited(); }

    Read the article

1