When declaring a struct you need to add a semicolon after the declaration, for example:
struct data
{
int id;
}; <-- notice the semicolon
Type: Posts; User: kezman
When declaring a struct you need to add a semicolon after the declaration, for example:
struct data
{
int id;
}; <-- notice the semicolon
Thanks for the suggestions guys. The C++0x auto feature is looking pretty attractive right now. Is it safe start using C++0x? Im assuming it'll be backwards compatible with the previous standard, so...
Hey, I've created a templated Vector class and I want to be able to overload addition/multiplication operators etc. But I'm having a problem when combining different datatypes, for example...
Hey,
I'm wondering what the best way to define the value of a static data member within a class is. The values I want to initialise the data to is the same throughout the entire life of the program,...
Hey,
I've been trying to combine two strings into a third one without modifying the original two. Heres the code I've got, but it wont compile:
char rho_dir[50], vel_dir[50];
char outputpath[50]...
Thanks for the suggestions, I'll try the struct approach.
Yea, each value has a prefix to tell the function what to do with it.
Hey,
I'm writing a function to read a set of strings and doubles from an input file, and I now want to send them back to the main program. The function returns each value from the input file at a...
Hey,
I've been working on some CFD code over the past few months and noticed a strange floating point error occuring when performing a division. For some reason I'm getting a difference between the...
I've already tried that, still get the same error :S.
Hey,
I need to pass a **pointer of an array as a function argument, but for some reason I keep getting the error "warning: assignment from an incompatible pointer type". As you can tell I'm pretty...
Hey, I'm very new to programming in C and I'm trying to write a program to simulate the fluid mechanics of a lid driven cavity. The output I get from the program is a set of 2D spatial coordinates...