does the Destructor deallocate memory assigned to the object which it belongs to or is it just called so that it can perform some last minute housekeeping before the object os deallocated by the compiler?
I've searched through the web and what I've found out is this:
To make the compiler warn you of the details of which methods you used that were deprecated use the javac.exe -deprecation switch. Then look in the Javadoc for the deprecated methods to find out the recommended replacements. Sometimes you just have to rename. Sometimes the replacements work quite differently.
But I'm not really understand how it works, can anybody help me with this?
I do not understand the documentation for gprof regarding how to compile your program for profiling with gprof. In g++, is it required to compile with the -g option (debugging information) in a addition to the -pg option or not. In each case I get different results, and I would like to see where the bottlenecks in my application are in release mode, not in debug mode, where many optimizations are left out by the compiler (e.g. inlining)
Are tr1 headers available for g++ v3.4.6? If so, how can I locate them at compile time.
The following is failing to compile:
#include <tr1/memory>
With the following error:
myModule.h:20:24: tr1/memory: No such file or directory
Do I need to move to a later compiler or do I have the headers somewhere?
Why is it that I have to upgrade to VS 2010 to build/run .NET4 projects? This seems somewhat ridiculous to me. Why should the run-time that my code runs against, or the compiler that the IDE invokes (hopefully) generically through MSBUILD rules have anything to do with the IDE I am using?
In C#, I can write something like:
using (new MyDisposableClass().MethodA());
The semicolon causes a compiler warning to be shown which states possible mistaken empty statement. I haven't run the above code but won't the method still be called?
What uses is there of this type of coding convention? I saw another thread on here about this but I ask in case there areny differences now/therefore different replies.
Thanks
I have trouble compiling a class, which has function pointers as member variables. The pointers are to functions which take an instance of a class as argument.
Like
template<class T, int N>
double (*f)(Vector<T,N> v);
I get "error: data member 'f' cannot be a member template" Compiler is gcc 4.2.
If you have a C++ project that has a bunch of .ODL files and the generated .h files from the ODL compiler, should doxygen be told to parse both .odl and .h, or only one or the other? In general I don't like documenting generated code but IDL is sort of a special case.
In any case, it seems like the member listing of ODL files is not quite working properly in my tests, are ODL files properly parsed?
1) Why are member constants available even if there are no instances of a its class?
2) Is the only reason why constant expressions need to be fully evaluated at compile time due to compiler replacing constant variable with literal value?
3) Since string is also an object, I would think the following would produce an error, but it doesn’t. Why?
class A
{
const string b = “it works”;
}
thank you
lets say I have this
char *something[] = {
"/bi",
"-c",
"5",
NULL,
NULL
};
but I want to declare it in hex, how would I do this; compiler keeps erroring out on me:
char *something[] = {
{0x2f,0x62,0x69},
{0x2d,0x63},
{0x35},
{0x00},
{0x00}
};
I have the following text in my MXLM sample:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
xmlns:ns1="com.infrared5.asmf.controls.flex.data.*"
xmlns:ns2="com.infrared5.asmf.controls.flex.video.*"
xmlns:ns3="com.infrared5.asmf.controls.flex.net.*"
xmlns:ns4="jedai.controls.flex.data.*"
xmlns:ns5="jedai.controls.flex.video.*"
xmlns:ns6="jedai.controls.flex.net.*">
Last 6 namespaces are defined as some "dotted" name pathes. Where does compiler look for them and in which order?
Hi,
What is the difference between sizeof(3.0) and sizeof(3.0f)
I was expecting both of them to give the same result (sizeof float)..but its different.
In 32 bit machine,gcc compiler,
sizeof(3.0f) =4
sizeof(3.0) = 8
Why so?
hi , my project this year is to develop a text mining tool (with new features)
so we need a mini script language in this tool to add annotation to texts
this language should be simple and like lisp grammars (left and right side) .
what i need is how to design this language ,i know how to constract the compiler ,
but how to write language grammars ? , and i want to use some mini open source language or any language bnf
please advice me and if there is a language i can use and customize to meet my needs ?
thanks
char *a = "apple";
printf("%s\n", a); \\ fine
printf("%s\n", a[1]); \\ compiler complains an int is being passed
Why does indexing a string pointer give me an int? I was expecting it to just print the string starting at position one (which is actually what happens when i use &a[1] instead). why do i need to get the address?
Hello,
I'm writing transpose function for 8x16bit vectors with SSE2 intrinsics. Since there are 8 arguments for that function (a matrix of 8x8x16bit size), I can't do anything but pass them by reference. Will that be optimized by the compiler (I mean, will these __m128i objects be passed in registers instead of stack)?
Code snippet:
inline void transpose (__m128i &a0, __m128i &a1, __m128i &a2, __m128i &a3,
__m128i &a4, __m128i &a5, __m128i &a6, __m128i &a7) {
....
}
base class:
Class List(Of T)
Function Contains(ByVal value As T) As Boolean
derived class:
Class Bar : List(Of Exception) ' Exception type as example '
Function Contains(Of U)(ByVal value As U) As Boolean
compiler tells me that that two are the same, so I need to declare Overloads/new this second function.
But I want use U to differentiate the type (one logic) like NullReferenceException, ArgumentNull Exception, etc. but want to leave the base function(no differentiation by type - other logic) as well.
These questions are a kind of game, and I did not find the solution for them.
It is possible to write ::: in C++ without using quotes or anything like this and the compiler will accept it (macros are prohibited too).
And the same is true for C# too, but in C#, you have to write ???.
I think C++ will use the :: scope operator and C# will use ? : , but I do not know the answers to them.
Any idea?
As far as I know there is no web browser with built in validators for HTML, CSS and JavaScript. Developing web pages without validation is like using a compiler that doesn't do syntax analysis. Even Firefox with its excellent plugins aimed at developers like Firebug lacks plugins for CSS and JavaScript validation. Wouldn't it be useful to have these plugins? Am I missing something?
I have the problem that C++ compiler does a recompile without any changes done.
Does anyone of you know how to get a list on criterias why VisualStudio decides to start a compilation.
It seems like I should be able to perform bit shift in C/C++ by more than 32 bits provided the left operand of the shift is a long. But this doesn't seem to work, at least with the g++ compiler.
Example:
unsigned long A = (1L << 37)
gives
A = 0
which isn't what I want. Am I missing something or is this just not possible?
-J