iPhone - OpenGL using C++ tutorial/snippet
Is there any good tutorial or code snippet out there on how to use OpenGL via C/C++ on the iPhone? ...
Is there any good tutorial or code snippet out there on how to use OpenGL via C/C++ on the iPhone? ...
int a = 2, b = 3; float f = 2.5; double d = -1.2; int int_result; float real_result; real_result = a * f; real_result = (float) a * b; d = a + b / a * f; d = f * b / a + a; ...
I have a need for some C or C++ code, compilable under Linux, to be able to take a list of IP addresses of some arbitrary number of remote hosts machines and obtain a ethernet MAC address for each one. These host machines may be on the same subnet or they could be on a different subnet behind a router. Its OK if the MAC address of some o...
Hi guys! I want to use designated initializers, but what about the others index that aren't initialized? Are they spend my memory too? for example: EDIT PART: { int array[590] = {[2] = 1}; note: I don't use the other array index, like this example i want to use only one, but i will allocate memory for another index? (okey I know ...
I'm just starting to learn how network programming in C works, and I've written a small program that sends messages to and from a UNIX terminal. I'm using pthreads in my program, one of which essentially just waits on recvfrom() to receive a message. However, I want to be able to close all threads properly if the users chooses to quit t...
I've been searching and experimenting for nearly four hours now, so I'm gonna just ask straight up: How can I correctly use the Authorization Services API to show the user a system-level authorization window, the same one you see when you click a lock icon in System Preferences? From what I can tell, there is no way to do it using Coco...
For example (in C): int break = 1; int for = 2; Why will the compiler have any problems at all in deducing that break and for are variables here? So, we need keywords because we want the programs to be readable we do not want to over-complicate the job of already complex compilers of today but most importantly, a language is lot ...
How can I display a splash screen using C or C++ in Windows? What libraries or Windows components would be applicable? ...
I want to transfer files across the network using C or C++. What topics should I look up? How can I do this? ...
Is there an open source project that allows for an auto-update of windows binaries? The Luau update library is very similar to what I'm looking for but it was abandoned in 2005. ...
I'm working on a texture management and animation solution for a small side project of mine. Although the project uses Allegro for rendering and input, my question mostly revolves around C and memory management. I wanted to post it here to get thoughts and insight into the approach, as I'm terrible when it comes to pointers. Essentiall...
I'm looking for a key -> value dictionary library written in C that supports a theoretically unlimited number of cheap transactions. I'd like to have one dictionary in memory, with hundreds of threads starting transactions, possibly modifying the dictionary, ending (completing) the transaction or potentially aborting the transaction. On...
As an example for later use in Android I wrote a simple callback interface. While doing so i ran into the following error or bug or whatever. In C the two commented lines are supposed to be executed resulting in calling the C callback onChange. But instead i get an UnsatisfiedLinkError. Calling the native Method directly in Java works ju...
The code below is just not working. Can anybody point out why #define STACK_SIZE 1524 static void mt_allocate_stack(struct thread_struct *mythrd) { unsigned int sp = 0; void *stck; stck = (void *)malloc(STACK_SIZE); sp = (unsigned int)&((stck)); sp = sp + STACK_SIZE; while((sp % 8) != 0) sp--; #ifdef li...
First up, I should let you know that I am learning C, so my apologies if this question seems stupid to a more advanced developer. I know you can print with printf() and puts(). I can also see that printf() allows you to embed variables inside and do some stuff like formatting. Is puts() merely a primitive version of printf(). Should it...
Hi, The assignment at my first year uni computing course says my program should read a barcode number, and then display the same 13 digit barcode number separated by hyphens. For example, 9300675016902 should look like 930-067501-690-1. The restrictions say I can't use the following: No arrays No strings No functions. Any direction...
I have a char array with data from a text file and I need to convert it to hexadecimal format. Is there such a function for C language. Thank you in advance! ...
void RemoveSpace(char *String) { int i=0,y=0; int leading=0; for(i=0,y=0;String[i]!='\0';i++,y++) { String[y]=String[i]; // let us copy the current character. if(isspace(String[i])) // Is the current character a space? { if(isspace(String[i+1])||String[i+1]=='\0'||leading!=1) // l...
Hi everyone, even though it is possible to write generic code in C using void pointer(generic pointer), I find that it is quite difficult to debug the code since void pointer can take any pointer type without warning from compiler. (e.g function foo() take void pointer which is supposed to be pointer to struct, but compiler won't compla...
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <stdio.h> void error(char *msg) { perror(msg); exit(0); } int main(int argc, char *argv[]) { int sock, length, fromlen, n; struct sockaddr_in6 server; struct sockaddr_in6 from; int portNr = 5555; char buf[1024]; le...