Although there seem to be very few up to date references for OpenGL 3.x itself, the actual low level manipulation of OpenGL is relatively straight forward. However I am having serious trouble trying to even conceptualise how one would manipulate VBOs in order to render a dynamic world.
Obviously the immediate mode ways of old are non ap...
Here,job is something like a complete utility.
I need to know this to start the c/java journey!
...
Please check the below program.
#include <stdio.h>
struct st
{
int a ;
}
fn ()
{
struct st obj ;
obj.a = 10 ;
return obj ;
}
int main()
{
struct st obj = fn() ;
printf ("%d", obj.a) ;
}
Following are the questions
What is the output of the program?
Where is ';' terminating the declaration of 'struct st'?
By ISO IE...
Hi,
I've got a following struct
struct teststruct
{
int *a;
void *data;
};
Is it possible to do a deep copy of structure which contains a void pointer? I assume that I cannot tell how many bytes data pointer points to? So I cannot malloc specified number of bytes and do memcpy. Am I right?
...
Hello
I want to define char (ie 'a AND 'a') but I am having issues in checking errors.
Here how I write the rule and check:
char " ' " {letter}
code
{char} {
int x =input() ;
//printf("%d",'a');
if(x == 10)
{
return(tCharunterm);
}
...
I want to start reading the Python source code.
My experience,
I know Python and Java very well. I know some other languages at various levels of proficiency, but neither C/C+/ particularly well. I studied C in college, but have never professionally programmed in it.
My Reasons for reading this code.
Understand how python works unde...
I've found conflicting answers on the web - some say it does, some say it doesn't. I was unable to find any details in the official Qt documentation either. So does Qt have C bindings or not?
...
I'm not sure if this is even possible, but given an executable file (foo.exe), with has many libraries which has been linked statically.
Is there any software that extract from this file the .lib ( or .a ) that lay inside the executable ?
Thanks.
...
To learning a language it is recommended to read some good code written in it. I want to recommend to friend some good C code to read. What projects are suitable online for reading good code?
Criteria:
Written in good style
Well documented (both externally and internally if possible)
Real-world, not tutorial-level or introductory book...
First, sorry for my poor language. I'm using VC++ Express myself.
Now I'm studying about arrangements. The book gave me a project like so:
Make a 5x5 matrix.
Each column is for subjects (4 of them)
Each row is for students (same, 4 of them)
Each cell saves a score.
At the end of each row/column, sum the row/column.
And this is my ...
I've made a driver for Windows, compiled it and tried to start it via SC manager, but I get the system error from the SC manager API:
ERROR_PROC_NOT_FOUND The specified procedure could not be found.
Is there a way to get more information about why exactly the driver fails to start?
WinDbg or something? If I comment out all code in my ...
I've recently set up a MinGW + MSYS environment on my laptop to check how things are with Netbeans C/C++ support. Everything seems to work fine, however, during my testing I have noticed a difference between GCC and Microsoft's cl.exe compiler.
Here's a sample program:
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int mai...
I need to determine roughly how much VRAM a system's graphics card has. I know all the reasons why I shouldn't but I do. It doesn't need to be perfect (some cards lie etc.) but I need a ballpark. On mac it's fairly easy through core graphics and IOKit to just politely ask how much VRAM is attached to a display, but I haven't a clue on wi...
I'm the network programmer on a school game project. We want to have up to 16 players at once on a LAN. I am using the Server-Client model and am creating a new thread per client that joins. However, a lot of CPU time is wasted just checking on each thread if the non-blocking port has received anything from the client.
I've been read...
I'm making a C program that needs to use two stacks. One needs to hold chars, the other needs to hold doubles. I have two structs, node and stack:
struct node {
double value;
struct node *next;
struct node *prev;
};
struct stack {
struct node *last;
struct node *curr;
};
The problem is that I need one of each type...
This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do this like so:
int main()
{
char* str = "Hej du kalleåäö";
printf("length of str: %d", strlen(str));
for (int i = 0; i < strlen(...
I have a library compiled into a .a file, linked against my application. (iphone, developing with Xcode)
Everything seems to be fine, linking seems to succeed, but when I run the program it crashes. The point of crash is at a memcmp() call in the statically linked library. The debugger shows all kind of stuff called with "dyld" in their...
Hi!
I'm rewriting an old program to do some new stuff, and suddenly I get a segmentation fault error on the following line of code:
time_t seconds_since_time_begun = time(0);
Why, oh why?
Update:
I have included the time.h header file in my code, and when I tried what pmg suggested below, both variables were 4 in size.
When I tried...
I'm having trouble passing a pointer to a structure as an argument to a thread cancellation cleanup handler. Here's some sample code that blows up when it hits the compiler. Any idea what I'm doing wrong?
#include <pthread.h>
typedef struct struct_def {
/* data */
} struct_def;
struct_def *ptr_to_struct_def;
void *
thread_functi...
Hi,
I have the work of implementing a distributed system of nodes (like p2p nodes) each of these nodes (lets say A,B,C and D) perform certain functions and need to interact with each other for various operations such as synchronize operations and other things like 15 A nodes interact with a group of 5 B nodes to get into the least loade...