I know there is a standard behind all C compiler implementations, so there should be no hidden features. Despite that, I am sure all C developers have hidden/secret tricks they use all the time.
Hi,
while(((long)(1000*ratio*((long)clock()-(long)t0))%100)/1000)<Data_Read_Rate);
The above line is generating the following error:
"Syntax Error before < token".
Why is this error coming up?
I use MINGW32 for development(GCC compiler).
Thanks...
I have gcc installed in c:/programfiles (also set as a path variable), and i have all the necessary files for gtk from http://www.gtk.org/download-windows.html, glib,gtk,pango,atk and cairo. Although I have no clue as to how to compile a c program using gtk with the gcc compiler. How do I set everything up so that it works?. (I don't know where each zip file goes.?) basically I don't really know where start.
hello
I am trying to use oprofile to generate call graph.
Compiler is g++, platform is linux x86-64, linker is gfortran
C++ code is compiled with -fno- omit-frame-pointer.
oprofile is started with --callgraph=25.
report I run with --callgraph.
the call graph is produced but it's only includes self time, which is not much use
what am I missing?
@protocol MyViewDelegate <NSObject>
- (void) didFinishProcessing:(MyView*)myView; //compiler stops here with error
@end
@interface MyView : MySuperclass {
id<MyViewDelegate> _delegate;
}
@property (nonatomic, retain) id<MyViewDelegate> delegate;
@end
When I try to compile I get " expected ')' before MyView ".
Where is the error?
I am building an application using Action script 3 I am retrieving some XML from the web however the node names are mms:Image mms:Results etc my action script compiler is throwing an error becuase it is not expecting to see the semi colon in the node name. How to I access the nodes?
thanks
MacRuby 0.5 includes a ruby compiler built on LLVM called macrubyc.
Does anyone know if it would be possible to dynamically load gems from compiled code? Or compile the gems and link them in? Is this planned? Or how compiled code will be able to make use of gems in general.
In this section of a function (.NET 2.0):
public void AttachInput(T input, int inIndex) where T : struct
{
if (input is int)
{
Inputs.Add(inIndex, (int)input);
InputCount++;
IsResolved = false;
}
}
The compiler shows the error "Cannot convert type 'T' to 'int'.
So, I used Convert.ToInt32() which worked - but does it box input to an object? Is there a better solution? Thanks
I was curious to know what would happen if i assign a negative value to an unsigned variable.
The code will look somewhat like this.
unsigned int nVal = 0;
nVal = -5;
It didnt give me any compiler error. When i ran the nVal was having strange value. Could it be that some 2's complement value gets assigned to nVal.
What is the shortest / most elegant way to implement the following Scala code with an abstract attribute in Python?
abstract class Controller {
val path: String
}
A subclass of Controller is enforced to define "path" by the Scala compiler. A subclass would look like this:
class MyController extends Controller {
override val path = "/home"
}
Can I get JAXB 2.0 XJC compiler to generate a generic class for me?
Something as simple as:-
public class Shape<T> {
T myShape;
// getter / setter
}
I see references for this in the spec but am not sure I'm reading it right. I always get Object references.
I accidentally moved my Dynamic Data' folder into myImagesfolder. The project still compiles, but it's just not right. However, when I try to move it back to the root in Visual Studio, I get an error that the destination folder already exists. If I moveDynamic Data` back to the root outside of Visual Studio, the project no longer compiles because the compiler can't find any dynamic data files.
My infancy with git prompted me to ask here before embarking on an unpleasant 2am quest.
what is your java 1.6 favorite feature?
Java 6 has some nifty feature:
SeriveLocator
Support to Scripting language
Acess to Compiler
APT enhancement (Annotation)
And more...
What is the one you like the most, and found it very useful?
I have this snippet of the code
char *str = “123”;
if(str[0] == 1) printf("Hello\n");
why I can't receive my Hello thanks in advance!
how exactly compiler does this comparison if(str[0] == 1)?
Hello, recently I've been trying to debug some low level work and I could not find the crt0.S for the compiler(avr-gcc) but I did find a crt1.S
What is the difference between these two files? Is crt1 something completely different or what?
These questions are a kind of game, and I did not find the solution for them.
It is possible to write ::: in Cpp without using "" or anything like this and the compiler will accept it. (macro-s are prohibited too)
And the same is true for C# too, but in C#, you have to write ???.
I think Cpp will use the :: scope operator and C# will use '? :' , but I do not know the answers to them.
Any idea?
When I compile a c++ application I'm writing that makes use of hash_map, I get this warning on g++ 4.3.2:
You are using the deprecated header . To eliminate this warning, use an ANSI-standard header file or use hte -Wno-deprecated compiler flag.
9> #include <ext/hash_map>
What include replaces this? I've searched for a while on google, and can't find anything except for people having similar problems, but no solution.
Does anyone have experience developing with ESQL/C for INFORMIX-SQL, as in calling C funcs within "Perform" screen generator and "ACE" report writer?
I have ISQL without ESQL/C. I experimented compiling a perform screen, where in the instructions section I put "ON BEGINNING CALL userfunc() END" and although I don't have
ESQL/C, the Perform screen successfully compiled without errors!.. Apparently, the compiler didn't reject the C call even though there's no ESQL/C or C program linked.
If I have a int32 type integer in the 8-bit processor's memory, say, 8051, how could I identify the endianess of that integer? Is it compiler specific? I think this is important when sending multybyte data through serial lines etc.
I have a very simple DLL written in unmanaged C++ that I access from my application. I recently switch to Visual Studio 2010, and the DLL went from 55k down to 35k with no code changes, and now it will no longer load in Windows 2000. I didn't change any code or compiler settings. I have my defines setup for 0x0500, which should include Windows 2000 support. Has anyone else run into this, or have any ideas of what I can do?
I want to use some of the libraries produced by the Eclipse project through Maven. I 've had a look at the main Maven repo and while it looks like that there are a few projects already imported, their versions are old and some important ones are missing (e.g. cdt). Is there any Eclipse project official Maven repository? If not, what would be the best option to use current versions of libraries such as the JDT compiler in a maven-enabled project?
Although it runs correctly, the following results in the aforementioned compiler warning:
return ((item - (my->items))/(my->itemSize));
'item' is a 'void *'; 'my-items' is a 'void *'; 'my-itemSize' is an 'int'
Casting 'item' and 'my-items' as an 'int *' caused the program to run improperly. What is the best way to remove the warning?
I have deployed successfully the dotnetopenid dll under IIS7 but on my shared hosting service it says:
Compilation Error Description: An
error occurred during the compilation
of a resource required to service this
request. Please review the following
specific error details and modify your
source code appropriately.
Compiler Error Message: CS0246: The
type or namespace name 'DotNetOpenId'
could not be found (are you missing a
using directive or an assembly
reference?)
Why ?
Coming from Eclipse/Java, I noticed that in VisualStudio/C# it is not mandatory to care about Exceptions. While Eclipse forces the user to implement a try-catch-block or to add a throws declaration, this is not the case in Visual Studio.
What is the reason Visual Studio doesn't inform about unhandled exceptions?
Can I configure Visual Studio to force me to implement try-catch-blocks, or at least add a compiler-warning?
So I just tried excluding String[] args from the main method
It compiled alright !
But JVM is showing an exception
Why did it compile when String[] args HAS to be included every time ?
What is going on here ? Why won't it show a compilation error ?
typing this made me think that may be compiler did not see it as THE main method ..is that so ?