i am new to webkit. I managed to open a html file using webkitgtk in c but i dont know how to access the html elements for setting values, changing content etc .. (example : filling values in text boxes ..).. please help me out..
Thanks in advance ..
...
Why and how does dereferencing a function pointer just "do nothing"?
This is what I am talking about:
#include<stdio.h>
void hello() { printf("hello"); }
int main(void) {
(*****hello)();
}
From a comment over here:
function pointers dereference just
fine, but the resulting function
designator will be immediately
c...
Hello I have a question for a c programmer out there, we have a tast at school to create a soft real time system in an operation system made by our teacher.
Well that is all fine and dandy, we have chosen to create a system that calcuate how many unites of medicine a diabetic need based on his or hers blood sugar. It does not need to be ...
I am guessing from # that it is only a compile-time utility. How can it be used in C/C++ programs?
Did not find much about it on the internet. Any links would be helpful.
...
There are certain int values that a float can not represent.
However, can a double represent all values a float can represent? (My intuition says yes, since double has more fractional bits & more exponent bits, but there might be some silly gotchas that I'm missing).
Thanks!
...
Hello,
I have a structure in my program that contains a particular array. I want to scan a random file with numbers and put the contents into that array.
This is my code : ( NOTE : This is a sample from a bigger program, so I need the structure and arrays as declared )
The contents of the file are basically : 5 4 3 2 5 3 4 2
#include...
Hello,
I have a simple problem;
Here is the code :
#include<stdio.h>
main(){
int input;
printf("Choose a numeric value");
scanf("%d",&input);
}
I want the user to only enter numbers ...
So it has to be something like this :
#include<stdio.h>
main(){
int input;
printf("Choose a numeric value");
do{
scanf("%d",&input);
}whi...
I am trying figure out whats going on with my HLSL code but I have no way of debugging it cause C++ gives off no errors. The application just closes when I run it. I am trying to add lighting to a 3d plane I made. below is my HLSL. The problem consist when my Pixel shader method returns the struct "outColor" . If I change the return valu...
Hello there,
I have a program that has this code :
#include<stdio.h>
main(){
int input;
char g;
do{
printf("Choose a numeric value");
printf(">");
scanf("\n%c",&input);
g=input-'0';
}while((g>=-16 && g<=-1)||(g>=10 && g<=42)||(g>=43 && g<=79));
}
It basically uses ASCII manipulation to allow the program to ...
In short, I would like to do this:
const char **stringPtr = &getString();
However, I understand that you can't & on rvalues. So I'm stuck with this:
const char *string = getString();
const char **stringPtr = &string;
I can live with two lines. Am I introducing problems with this hack? I should have no fear of passing stringPtr out ...
Hi,
I have two questions regarding ceil function..
1. The ceil() function is implemented in C. if i use ceil(3/2), it works fine.. But when i use ceil(count/2)-if value of count is 3, then it gives compile time error..
/tmp/ccA4Yj7p.o(.text+0x364): In function FrontBackSplit': : undefined reference toceil' collect2: ld returned 1 ex...
int i ;
void set_array(int num){
int array[10];
for(i=0;i<10;i++){
array[i]=compare(num,i){
}
}
int compare(int a ,int b){
if(sub(a,b)>=0)
return 1;
else
return 0;
}
int sub(int a,int b){
return a-b;
}
anybody know how to convert to mips code
...
The shared library is causing much trouble for me, and disk space is far less expensive than the trouble itself.
How can I convert all shared libs(.dll) to static libs(.lib) and make my programe use them instead of using shared libs?
Note some .dlls are not directly refered to by my programe,e.g. my programe requires libpng,and libpng...
Hello,
Maybe I'm not understanding the differences between C and C++, but when and why do we need to use:
extern "C" {
? Apparently its a "linkage convention"?
I read about it briefly and noticed that all the .h header files included with MSVS surround their code with it. What type of code exactly is "C code" and NOT "C++ code"? I ...
I ask this question because the international standardization subcommittee for programming languages, or ISO/IEC JTC1/SC22 Programming languages, states on this page:
http://www.open-std.org/JTC1/SC22/WG14/www/standards
that Technical Corrigendum 3, the latest one, was published in 2007. Now I take it that this means the C language it...
I have this c code, where i need to calculate a dobule from a long.
double result;
long t2_value;
t2_value = 72;
result = t2_value * 1.2;
Now this code crashes at "result = t2_value * 1.2;" only with the error "Vector 0000000006".
Here is the strange thing, if i replace
result = t2_value * 1.2;
with
result = 72 * 1.2;
evythin...
Code snippet from here:
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
....
/* retireve the position of the ip header */
ih = (ip_header *) (pkt_data +
14); //length of ethernet header
....
But this image doesn't say it's necessarily 14:
How should I do it prop...
Code snippet from here:
void packet_handler(u_char *param, const struct pcap_pkthdr *header, const u_char *pkt_data)
{
....
/* retireve the position of the ip header */
ih = (ip_header *) (pkt_data +
14); //length of ethernet header
....
What's const struct pcap_pkthdr *header for(definition), when do we...
Hi there. I've been trying to solve this problem for a few days now but it seems I haven't grasped the concept of recursion,yet.
I have to build a program in C (recursion is a must here but loops are allowed as well) which does the following:
The user inputs 2 different strings.For example:
String 1 - ABC
String 2 - DE
The program is ...
I'm currently working on an assignment and this have had me stuck for hours. Can someone please help me point out why this isn't working for me?
struct book
{
char title[25];
char author[50];
char subject[20];
int callNumber;
char publisher[250];
char publishDate[11];
char location[20];
char status[11];
char type[12];...