#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
}
The above can pop up a window and a corresponding icon on taskbar.
I googled a lot but can't find any article that...
Ok this is only my second question, and it's quite a doozy. It's for a school assignment, but no one (including the TAs) seems to be able to help me. It's kind of a tall order but I'm not sure where else to turn.
Essentially the assignment was to make a cache simulator. This version is direct mapping and is actually only a small portion...
Hi,
what is the difference between following function declarations, which create and return the array in C/C++? Both methods create the array and fill it with proper values and returns true if everything passed.
bool getArray(int* array);
bool getArray(int* array[]);
Thanks
Best Regards,
STeN
...
#include <stdio.h>
void func(int arr[],int xNumOfElem)
{
int j;
for(j=0; j<xNumOfElem; j++)
{
arr[j] = j + arr[j];
printf("%d\t",arr[j]);
}
printf("\n");
}
int main()
{
int *a,k;
a = (int*) malloc(sizeof(int)*10);
for(k = 0; k<10; k++)
{
a[k] = k;
printf("%d\t",a[k]);
...
If I tell the C preprocessor to #include a file and use CPPFLAGS to help find the needed file, then the file is included already, right? What, if any, use is telling the C compiler about the same include directory with CFLAGS?
...
Hi All,
I do have certificates in DER and PEM format, My goal is to retrieve the fields of Issuer and Subject And verify the Certificate with the CA public key and simultaneously verify CA certificate with the Root public key.
I am able to retrieve all the details of issuer and subject But unable to verify the certificate. Please help...
AFAIK, we can have two static variables with the same name in different functions? How are these managed by the compiler and symbol table? How are their identities managed seperately?
...
I'm trying to understand how floating point numbers work.
I think I'd like to test out what I know / need to learn by evaluating the following: I would like to find the smallest x such that x + 1 = x, where x is a floating point number.
As I understand it, this would happen in the case where x is large enough so that x + 1 is closer t...
So I have a parent and child process, and the parent can read output from the child and send to the input of the child. So far, everything has been working fine with shell scripts, testing commands which input and output data. I just tested with a simple C program and couldn't get it to work. Here's the C program:
#include <stdio.h>
in...
What is the use of defining a anonymous structure within a structure? When should this concept be used?
...
I am a beginner in using LabWindows/CVI and I need to load an image on a chart. I need an example. Please help!!
...
hello, I have some problems with Eclipse, I have structure
struct Account{
const char* strLastName; //Client's last name
const char* strFirstName; //Client's first name
int nID; //Client's ID number
int nLines; //Number of lines related to account
double lastBill; //Client's...
Hi all
I have a problem with a C application; i have on a .txt file some float numbers and I have to read them and sort in descending way. When i do the fscanf command and then the printf, i get on the screen strange numbers (memory location I suppose). How can i solve the problem?
Thanks in advance
Edited
The application is composed by...
I am designing an image decoder and as a first step I tried to just copy the using c. i.e open the file, and write its contents to a new file. Below is the code that I used.
while((c=getc(fp))!=EOF)
fprintf(fp1,"%c",c);
where fp is the source file and fp1 is the destination file.
The program executes without any error, but the image...
Can I use free for const char*? Will this cause any problems?
...
Hi Guys,
I'm working on a C project with around 30 source files (.c). I'm building this project on a 32 bit micro-controller(i.MX515) running on Ubuntu using GNU tools.
The compilation phase completes successfully, however when the linking process starts I get this error (For full error at the end of the quesiton):
In function `...
I'm trying to draw a line with the DrawPrimitive function in Direct3D.
Can I draw tranparent line with the function?
If I can, how to design it?
...
Hi,
i was just asked today, but i couldn't answer precisely so that's why i'm asking here :-)
There is any book about Firewall design and implementations (Unix environment and C)?
For sure, i could recommend TCP/IP books, and what i did, but there is some design decisions, that are not related with TCP/IP. For sure, i said about the n...
Hello,
I have a C code which I am trying to compile in Cygwin and which contains both the drand() and srand() functions. I had Windows Vista with Cygwin installed and the code seemed to comile fine, but my computer broke and I had to get a new one. The new computer has Windows 7 64-bit version. I had a few issues downloading Cygwin b...
Hello,
I would like to know how a variable length array is managed (what extra variables or data structures are kept on the stack in order to have variable length arrays).
Thanks a lot.
...