Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I want to read some unicode parameters via C++ main function. In Windows I can use wmain which is Mircosoft extension to standard C++. But I don't know to how to do the same in Linux platforms.
On linux you use the Standard C++ main function, and your data will be conveyed through char const*.
You should probably expect the encoding to be UTF-8 because this is the default on Linux.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Visual Studio allows instructs to clear the processors interrupt flag via _disable or _enable (see link). When, it is recommended to use such tools. Especally, in view of performance.
https://msdn.microsoft.com/en-us/library/tzkfha43.aspx
_disable() and _enable() are used, respectively, to disable and enable interrupts.
Read more about interrupts here.
If you're a C++ beginner, you probably don't need this, except if your goal is to write an operating system kernel.
In your case, never. Just forget it exists. :)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Hello there I am a realative newbie when it comes to using different "commands" in order to achieve things so I was wondering if any of you know a way to bind a key to do a certain task anywhere in the programme ,so I would be able to display a function for example and after the display finishes the programme carries on normally like nothing happened and then that same key on any other push would still do the display . Thanks in advance
Plain C++ does not have any concept of "key binding". The platform (e.g., the operating system) has this knowledge and it provides some libraries to handle it. So, you must provide more information about the operating system, or use a cross-platform library like Qt.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to extract information about torrent file like: files names inside it, their sizes ..., is there a C++ library for Linux that help me achieve this easily? or what is the structure of a torrent file and how do I find these information?
You can use the libtorrent library—a feature complete C++ BitTorrent implementation focusing on efficiency and scalability.
If you want to write your own library, there is the official BitTorrent Protocol Specification but it is very poorly written and lacks a lot of details. There is also a much better specification available.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
On the Wikipedia List Of Compilers page, it tells you if a compiler is "Unix-like". What does this mean? Does it effect how to write the source code? I'm coming over from MinGW (which is listed as "Unix-like" to another compiler, just wanted to see if this was a important thing to look out for).
I think you miss-understand. That column indicates if your compiler is available on a "unix-like" OS/platform, of which linux is an example.
You can see this by the fact that MingGW is listed under the windows column for compilers (GCC) which are available on many platforms, which means that MinGW is the windows port/version of GCC (in the context of this question).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am working on Linux and need to change given code using win32 api functions into code that can run on linux
bool ret = ::TlsSetValue(tlsInChessFlag, (void *)(((size_t)TlsGetValue(tlsInChessFlag))+1));
can some please tell me what could be equivalent code in c++ ubuntu??
Thanx in advance
You could also use the __thread keyword available in GCC (it is a GCC extension).
And to develop C++ code which is portable on both Windows and Linux, you could use some cross-platform library, like e.g. Qt
Use pthreads facilities:
http://en.wikipedia.org/wiki/Thread-local_storage#Windows_implementation
Use boost's portable thread local API on both Windows and Linux.
http://www.boost.org/doc/libs/1_35_0/doc/html/thread/thread_local_storage.html
You could use the boost::thread implementation for thread local storage