consider this :
[mdstest:~/onkar/test]$cat test.c
#include<stdio.h>
int main(int argc,char **argv)
{
printf("%p\n",main);
return 0;
}
[mdstest:~/onkar/test]$make
gcc -g -Wall -o test test.c
[mdstest:~/onkar/test]$./test
0x8048368 ------------------------------------- (1)
[mdstest:~/onkar/test]$gdb test
:::::::::::
:::...
I have an existing application developed in VC++ 6.0 which has been installed in many customer sites throughout the world.
This application was working fine until sometime back when the Microsoft KB981793 hot fix was applied. This hotfix has changes related to Timezones and was crashing a crash due to an array overflow in our applicati...
An emirp (prime spelled backwards) is a pime number whose reversal is also prime. Ex. 17 & 71. I have to write a program that displays the first 100 emirps. It has to display 10 numbers per line and align the numbers properly:
2 3 5 7 11 13 17 31 37 71
73 79 97 101 107 113 131 149 ...
How can I pass a multidimensional array to a function in C/C++ ?
The dimensions of array are not known at compile time
...
C++ Can I print the content of 1 or 2 dim array using Visual Studio's Command window? I guess it comes down to whether a "command window" support some kind of loop and print (?) syntax or not.
...
What are the benefits of explicit type cast in C++ ?
...
Dump of assembler code for function main:
0x0804833e <+0>: push %ebp
0x0804833f <+1>: mov %esp,%ebp
0x08048341 <+3>: sub $0x8,%esp
0x08048344 <+6>: and $0xfffffff0,%esp
0x08048347 <+9>: mov $0x0,%eax
0x0804834c <+14>: add $0xf,%eax
0x0804834f <+17>: add $0xf,%eax
0x080...
The exact error I'm getting is:
Cannot dynamic_cast 'object' (of type 'void*') to type 'class udDator(int)*'
(source is not a pointer to a class)
This is happening inside an overridden operator delete. I'm attempting to create a templated memory management class that can inherit into any other class, managing memory through references...
I am considering to use BDB XML, as in memory application data store. It is XML like data with definition records and data records, i have provided XPath like quiring for data access. Its running well except for a memory overflow problem, that occurs in some cases which can't be avoided (so, just ant to avoid mem-overflow), and data is s...
Possible Duplicate:
How do you get assembler output from C/C++ source in gcc?
Hello out there!
I have a C and C++ source code that I wanted to see in assembly code. How can I produce an equivalent asm codes for those? What tools should I use? Or is it already possible in using tools such as the gcc compiler? Then what command...
Is there any eclipse plugin that can generate UML/Class Diagram from C++ source code?
...
In a program I allocate a huge multidimensional array, do some number-crunching, then only the first part of that array is of further interest and I'd like to free just a part of the array and continue to work with the data in the first part. I tried using realloc, but I am not sure whether this is the correct way, given I must preserve ...
I am looking for a nice library that can talk to GMail from a Mac application. Really, I am thinking about writing a GMail application for the Mac. Thunderbird and Mail.app just don't cut it for me.
Anyway, the library should be written in C, C++ or Obj-C or at least have interfaces for those languages. Of course, anything free and/or o...
I was wondering what the difference between the WM_QUIT, WM_CLOSE, and WM_DESTROY messages in a windows program, essentially: when are they sent, and do they have any automatic effects besides what's defined by the program?
...
Usually auto-generated c++ "main" function has at the end
return (0);
or
return (EXIT_SUCCESS);
But why there are parentheses in above statements? Is it related to C language or something?
// EDIT
I know this is correct, but someone put these brackets for a reason. What's the reason?!
...
How can I dump symbols in .la file on Ubuntu Linux?
I get this linking error:
main.c:(.text+0xbfb): undefined reference to `Browser_new'
And I think my main.c is linking against libwebkit-1.0.la. So how can I find out if libwebkit-1.0.la has the symbol 'Browser_new'?
CXXLD libwebkit-1.0.la
CCLD Programs/GtkLauncher
...
I read somewhere that a lambda function should decay to function pointer if the capture list is empty. The only reference I can find now is n3052. With g++ (4.5 & 4.6) it works as expected, unless the lambda is declared within template code.
For example the following code compiles:
void foo() {
void (*f)(void) = []{};
}
But it do...
What would be the way to have java-style annotations in Ruby and in C++?
(Optionally, perhaps it is a matter of taste)
Are java-style annotations worth to be used, so you would recomend using them in other languages, if possible?
...
Is there any reliable API to Get Windows Folder in Windows in C++?
I am using the following way, however it failed.
BOOL CQUserInfoHelper::GetWindowsPath(CString& strWindowsPath)
{
TCHAR windowsPathTemp[MAX_PATH];
int nSize = MAX_PATH;
::GetWindowsDirectory(
windowsPathTemp,
nSize)...
I want to get system folder in windows, by reading SystemRoot.
How can I do it?
many thanks!
...