Mac OS X free C compiler
Is there a small, free C or C++ compiler for OS X, like TCC? Xcode is not small, or simple like TCC, AFAIK. I'm looking for something like a GCC binary file or TCC for OS X. ...
Is there a small, free C or C++ compiler for OS X, like TCC? Xcode is not small, or simple like TCC, AFAIK. I'm looking for something like a GCC binary file or TCC for OS X. ...
I'm developing an interface for an add-on to a game. I can't use the game API (for several reasons including the fact that the code must be game-agnostic) and I need to get keyboard input from the user so I've decided to use a keyboard hook (WH_KEYBOARD) to process user input when certain conditions are met. The problem is that while I c...
Hello, i have a QMainWindow. It has this parameters: this->setWindowFlags(Qt::Tool); this->setFocusPolicy(Qt::StrongFocus); this->setAttribute(Qt::WA_QuitOnClose,true); After showEvent calles my window is shown but unactivated. I tried to overload show function: ... QMainWindow::showEvent(event); this->activateWindow(); ... B...
Hello, i'm trying to get web-page data in string that than i could parse it. I didn't found any methods in qwebview, qurl and another. Could you help me? Linux, C++, Qt. EDIT: Thanks for help. Code is working, but some pages after downloading have broken charset. I tried something like this to repair it: QNetworkRequest *request = new...
Hi Is it possible to set different texture filtering when working with sprites? ...
Because of memory constrains, I have to store some pairs of values in an array with 6 bits/pair (3 bits/value). The problem comes when I want to access this array as a normal one, based on the index of the pair. The array looks like this |--byte 0 | --byte 1 | --byte 2 |00000011 | 11112222 | 22333333 ... and so on, the pattern repe...
I'm trying to copy the Qt systray example here: http://doc.trolltech.com/4.3/desktop-systray.html Things seem to be working except that the QSystemTrayIcon object is not sending an activate signal. Here's my mainwindow.cpp code: #include <QtGui> #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *paren...
Hi everyone i have a question about templates, is there a way for taking type of a template class, for example //i have template function template<typename T> IData* createData(); //a template class instance std::vector<int> a; //using type of this instance in another template //part in quotation mark is imaginary of course :D IData...
I need an array where size is known at compile time. I know I can use std::vector or boost::array. But that's doesn't teach me how it works internally. Also I couldn't find how to add items into boost::array other than using the initializer. I have written the following code for a generic array. My intention is to get familiar with itera...
I was wondering how a Garbage Collector can be implemented with C++ full power of pointers arithmetic. Also, In languages like Java, I can not assign literal addresses to references. In C++ it is very flexible. I believe that C# has both, but again, the unsafe pointer in C# is the responsibility of the programmer. EITD :: guys, I am as...
I need your help with the following scenario: I am reading some data from hardware into a MemoryStream (C#) and I need to pass this data in memory to a dll implemented in unmanaged C++ (using pointer ??). The data read (into stream) is very large (megabytes). I understand that I can P/Invoke this dll but what I am not sure is how to pas...
Possible Duplicate: What is the best way to encrypt a text file in C/C++? It may sound weird but there is a C++ web application (CGI). Every new request creates a new process. So in order to maintain session a text file will be created on the server which will contain info like sessionid, username, password, timestamp etc. This ...
Any easy way to create a PDF document of a word file from desktop application using C++ or C#? any best practices, please share. list all possible APIs free/paid so that this thread helps C++/C# programmers. ...
I was just reading this thread and wondered if it's easier to become a Java expert than a C++ one? Is it because it's very easy to write wrong code in C++ while in Java you have less flexibility (memory management for example) which prevents you from writing code horrors? Or is it because C++ is just inherently harder to learn and master...
Hi i have tried returning a collection of objects from c# and access them usig c++ via COM but failed.I have tried for List ArrayList and IDictionary all and failed. i have tried http://stackoverflow.com/questions/1032060/how-to-return-a-collection-of-strings-from-c-to-c-via-com-interop also but not succeed. can any body Help me ...
I'm writing a simple program. There is only one class in it. There is a private member 'char * number' and two function (there will be more, but first these should work correctly :) ). The first one should copy the 'source' into 'number' variable (and I suppose somewhere here is the problem): LongNumber::LongNumber(const char * source ...
When calling functions that always throw from a function returning a value, the compiler often warns that not all control paths return a value. Legitimately so. void AlwaysThrows() { throw "something"; } bool foo() { if (cond) AlwaysThrows(); else return true; // Warning C4715 here } Is there a way to tell the...
Some APIs only support output to files. e.g. a library that converts a BMP to PNG and only has a Save(file) option - no in memory function. Disk IO is slow, though, and sometimes you just want in-memory operations. Is there a generic solution to such a problem? Maybe a fake in-memory file of sorts that would allow one to use the library...
I wanted to see that a dynamically loaded library (loaded with dlopen etc.) really uses its own new an delete operators and not these ones defined in the calling program. So I wrote the following library.cpp #include <exception> #include <new> #include <cstdlib> #include <cstdio> #include "base.hpp" void* operator new(size_t size) { st...
UPDATED QUESTION Since the ctor is not supported by .NETCF (public FileStream(IntPtr handle, FileAccess access). Could you please suggest other ways of sharing large file in memory between managed and unmanaged code on a limited resource (RAM) platform. Basically I want to map the file in the upper region of 2GB user space (Win CE 5.0) ...