I've heard that the advantage of java is that people can write code, compile it for the JVM, and run it anywhere. Each person just needs a JVM app for their platform.
Of course, it looks similar to the current situation, where everybody has a compiler specific for their platform. So the advantage isn't explained by that. But I think I...
Possible Duplicate:
Lightweight and portable regex library for C/C++?
I'm looking for a C++ (C is acceptable, too) library for matching regular expressions. The library should satisfy these requirements:
Can be built on Windows (MSVC 7 and newer)
Can be built on Linux (g++ 3.4 and newer).
Has no external dependencies; nothin...
When two vowels come one after another then the count should increment.But i dont know why its incrementing it more than that.
#include<stdio.h>
#include<conio.h>
void main(void)
{
int i,j,count=0;
char string[80];
printf("Enter a string:\n");
gets(string);
for(i=0; ;i++)
{
if(string[i]=='\0')
...
Possible Duplicate:
multiplication of large numbers, how to catch overflow
In close to the metal languages like C, C++ and D, what's the most efficient reasonably portable way (i.e. w/o using assembler, though you may assume two's complement arithmetic and wrap-around behavior) to detect overflow of an unsigned 64-bit integer ...
Possible Duplicate:
Whats the best way to become familiar with a large codebase?
Dear fellow C and C++ programmers, today I got my hands on a new base of code which is around 800,000 lines of code (C and C++ mixed). How do I get familiar with such a huge code? What code browsing tools do you suggest?
So far I found only MXR (...
Hello I'm using c++ with embedded SQL trying to receive command line arguments as SQL statements.
For instance I want to be able to do: ./a.out proceedings(foo#bar) and tokenize the argument into: proceedings, foo, and bar with #, (, and ) as delimiters.
Anyways, I was just wondering if there is a way to use brackets in the argument ...
When compiled by gcc and then run,
the code
int *p;
int main() {*p = 1;}
causes a segmentation fault.
Apparently, the memory location
contained in p cannot be written to.
Why????
On the other hand,
int q[];
int main() {*q = 1;}
runs just fine.
What's going on here??
Why does p contain only read-only memory?...
#include <stdio.h>
int main(int argc, char** argv)
{
void (*p) (void);
/* this obviously won't work, but what string could I put in
here (if anything) to make this execute something meaningful?
Does any OS allow instructions to be read from
the stack rather than text area of the process image? */
char *...
My objective is conceptually simple: I want to set a GetMessage global hook function that utilizes a shared file handle. The problem arises because to my understanding the DLL containing the hook function is loaded multiple times for each process, each with their own "address space". For this reason I'm led to believe I can't simply hand...
I have a C++ VS10 project. I want its part to be pure C. So I will have pure C lib and A C++ file that will have part with C code calling that pure Lib.
Is it possible? Will I have posebilety to pass data from that C part to C++?
...
I'm getting a segmentation fault trying to compile the following code. My question is, Is this the correct way to get text from a GtkEntry?. If it is, Why am I getting the segmentation fault?. If it´s not, What´s the correct way to retrieve text from a GtkEntry?.
void dialogoIngresarDados(GtkWidget *window){
GtkWidget *dialog;
GtkWidget...
So I want to wrap a simple java library so to be able to use its functions from C#. Is it possible, how to do such thing?
BTW can we do such thing from C?
...
I am confused when should I add the trailing _t to typedef'ed types?
For example, should I do this:
typedef struct image image_t;
or this:
typedef struct image image;
What are the general rules?
Another example, should I do this:
typdef enum { ARRAY_CLOSED, ARRAY_OPEN, ARRAY_HALFOPEN } array_type_t;
or this:
typdef enum { ARR...
I have written my own linked list implementation in C, and it works fine for storing values, but whenever I try to run through the list I get a segmentation fault. I'm not sure why the issue arises, and I spent a decent amount of time trying to run through the program myself but to no avail. Could you guys help me find the reason for the...
How i can know the size of all data type in my computer?
...
I've been trying to get this to work for a good few hours now, but I can't seem to get my head around it.
I'm trying to write a function that is able to return an array of strings.
#include <stdio.h>
#include <stdlib.h>
/**
* This is just a test, error checking ommited
*/
int FillArray( char *** Data );
int main()
{
char ** Da...
I'm trying to figure out an algorithm which can look at raw rgba pixels and return points that make up the polygon of the object inside example:
http://img706.imageshack.us/i/polii.png//
It doesn't have to return bezier curves or anything smooth or fancy, nor a connected outline as I showed, but basically the points to build such an ou...
I'm looking for a way to make my application produce smoother results in freehand mode. Right now it simply adds each mousemove points and makes a polygon out of this. I noticed modern vector applications produce bezier curves to make it look much smoother and im wondering how this is done? So how can I get the 4 points to do bezier inte...
Hello,
I need to get exif data in my C/gtk+ application. I use jhead for it. How can i get exif data with jehad.
I try so:
const char* file_name = ImageInfo.FileName;
But file_name = NULL;
Is anywhere samples in C/C++ how can i get exif data with jhead?
Thank you.
...
Does today's C or C++ compilers use the clrscr system function?
...