Hi, I'm facing an issue with c++ on vs2005 and also vs2008...
here's how you can reproduce the issue....
create a new (c++) project called 'test' (file|new|project)
select "Windows Forms Application"
and add the 'stdio.h' include and the code fragment below into the test.cpp source file.....
-------------------start of snippet-------...
Is any practical way to reference a method on a class in a type-safe manner? A basic example is if I wanted to create something like the following utility function:
public Result validateField(Object data, String fieldName,
ValidationOptions options) { ... }
In order to call it, I would have to do:
valida...
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(5934) : error C2872: 'IDataObject' : ambiguous symbol
1> could be 'C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\objidl.h(251) : System::Windows::Forms::IDataObject IDataObject'
1> or 'c:\windows\microsoft.net\framework\v2.0.50727\system.windows....
I have seen some nice Java compiler hacks wherein you can replace assertions by throw-exception statements, you can have auto-generated properties for fields and so on...
I was just wondering...
Is it possible to hack Java compiler so that it supports Operator Overloading?
EDIT :
It's not that I am missing operator overloading in Jav...
I just asked a question related to how the compiler optimizes certain C++ code, and I was looking around SO for any questions about how to verify that the compiler has performed certain optimizations. I was trying to look at the assembly listing generated with g++ (g++ -c -g -O2 -Wa,-ahl=file.s file.c) to possibly see what is going on un...
Is there any alternative to flex and bison (lex/yacc) combo? Any other tools that let specify a language grammar in BNF?
...
I'm creating a toy dynamic language (aching towards javascript) and while my implementation is on top of the DLR, I figured the solution to this problem would be pretty language/platform agnostic.
I have no problem with compiling recursive functions, or mutually recursive functions that exist next to each other. But compiling nested mut...
I am trying to write a program that inputs a positive number less than 10 and outputs the sum of the first numbers. For example 5 would be 5+4+3+2+1. The commands are Stop, Load, Store, Add, Sum, Multiply, Divide, Input, Output, Branch, Branch if 0, and branch if not 0. Can anyone help me out here. I am kind of stuck. well what I have wr...
I was just listening to episode 57 of Software Engineering Radio
(TRANSCRIPT: http://www.se-radio.net/transcript-57-compiletime-metaprogramming )
I'm only 40 minutes in, but I'm wondering why C is the language of compilers- when a Scheme subset would seem to be a better fit? (or some other HLL)
(excluding the obvious reason of not wanti...
I have the following class...
public class MyCustomLogger
{
public static int DEFAULT_INFO = 0;
public static int DEFAULT_LOGIN = 1;
//etc
public static void Log( ... )
{
doStuff(...);
}
public static void Log( ... , ... )
{
doStuff(...);
}
private static void doStuff(...)
{
//doLots of Stuff
}
So when I call MyCustomLogger.Log(....
how c# compiler works??
how it parses our whole solutions and .cs files... i want to know where it start and how everything works... i want to know from the asp.net perspective...
thx
...
I have to write some code in ML and it is my first time I`m going to use the language.
Is there any Development Environment for Standard ML? (preferably under Windows). I tried googling (and stackOverFlowing ! ) but all I found was plain compilers for Linux (at most with an interactive console), but no IDE nor Eclipse/NetBeans plugin.
An...
I'm using bison to build a compiler for a simple language. Here's part of the grammar:
stmt: IF '(' exp ')' stmt{
if(exp) $$=$5;
}
|PRINT ';' {
cout<<"hi";
}
;
exp: true|false
;
I encountered a problem in parsing this if statement: Say I have this code:
if(false) print;
"hi" will be printed anywa...
How do I get to see the output of a php compiler in notepad++ ? I see that there is a console output window in notepad++ but nothing gets displayed there.
...
Calling this method:
public static @Nonnull <TV, TG extends TV> Maybe<TV> something(final @Nonnull TG value) {
return new Maybe<TV>(value);
}
like this:
public @Nonnull Maybe<Foo> visit() {
return Maybe.something(new BarExtendsFoo());
}
compiles just fine in Eclipse, but javac gives an "incompatable types" warning:
found ...
I'd like to see all the places in my code (C++) which disregard return value of a function. How can I do it - with gcc or static code analysis tool?
Bad code example:
int f(int z) {
return z + (z*2) + z/3 + z*z + 23;
}
int main()
{
int i = 7;
f(i); ///// <<----- here I disregard the return value
return 1;
}
Update:
it ...
I've read that making a class sealed in C# is advisable in high-performance scenarios because it frees the compiler to make certain optimizations (e.g., inlining property getters) that it wouldn't be able to make otherwise. Is the same true for NotInheritable in VB.NET? My guess would be yes, but I'm posting this question in case someone...
Restatement of the question
I'm resurrecting this question because I just ran into this error again today, and I'm still utterly confused why the C# compiler bothers to check for collisions between namespaces and types in contexts where it makes no sense for a namespace to exist.
If I have...
public Foo MyFoo { get; set; }
...why wo...
This has been something that's been bothering me for a while. How does one go about parsing the following text into the HTML below using ANTLR? I can't seem to wrap my head around this at all.
Any Ideas?
Markdown:
> first line
> second line
> blockquote>
<p>first line
second line</p>
<blockquote>
<p>nested quote</p>
</b...
Is the latest binary release of Code Blocks with MinGW setup compatible with Windows 7? If not, is there any way to fix this, or any good alternatives ( via switching to a different compiler, different IDE, or both depending on the problem ).
P.S. For those who have used CodeBlocks, will switching IDE's or compiler change the file forma...