![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Unknown
Join Date: Apr 2008
Location: unknown
Posts: 87
Rep Power: 1
![]() |
calling native functions
i have to call a native function in c++, the puts(), i compiled the program but it doesnt output the string parameter?
but just pure blank c# Syntax (Toggle Plain Text)
__________________
------------------------------------------------------------------------- I thought what I'd Do was, I'd pretend to be one of those deaf mutes ------------------------------------------------------------------------ |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Aug 2008
Posts: 5
Rep Power: 0
![]() |
Re: calling native functions
Try calling the native C code,
fflush(stdout). It could be that the C standard library's output stream is not getting flushed, because Console.ReadKey() doesn't care or know about that. If you asked for input using a standard C stdin function, i.i.r.c. it would flush the stdout stream automatically. The C# standard input functions probably flush the C# standard output buffer, and don't know anything about the C output buffer, which means you have to flush it manually.Maybe. Anyway, try it. |
|
|
|
|
|
#3 |
|
SEXY SHOELESS GOD OF WAR!
![]() Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 1,197
Rep Power: 5
![]() |
Re: calling native functions
Your code works fine for me exactly as is. But yeah, try flushing stdout, to ensure it actually writes any buffered output.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
#4 |
|
Unknown
Join Date: Apr 2008
Location: unknown
Posts: 87
Rep Power: 1
![]() |
Re: calling native functions
thank you thank you thank you!!!
__________________
------------------------------------------------------------------------- I thought what I'd Do was, I'd pretend to be one of those deaf mutes ------------------------------------------------------------------------ |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling exit(???) functions | BstrucT | C | 12 | Jan 11th, 2008 3:16 AM |
| Calling .net functions from C++ | uman | C++ | 2 | Jul 26th, 2006 5:36 PM |
| binding between ordinary member functions & polymorphic member functions | ASH | C++ | 2 | May 11th, 2006 5:36 AM |
| Exporting Functions | victorsk | Visual Basic | 1 | May 18th, 2005 3:32 PM |
| User-defined creatNode and deleteNode functions for a doubly-linked list | jgs | C | 2 | Apr 28th, 2005 9:53 AM |