comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
December 2007
motuwethfrsasuw
     12 48
3456789 49
10111213141516 50
17181920212223 51
24252627282930 52
31       1
2007
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c++ Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Need advice on selecting a development environment         


Author: Ramon F Herrera
Date: Dec 23, 2007 23:01

My goal is to study (in the RMS sense) and familiarize myself with
some OSS code, until I reach the point at which I can make non-trivial
modifications to it. The class of applications I have in mind are
almost always written in C and run on Unixes. Historically, I have
used a terminal emulator, vi, and gcc/gdb for this type of project,
but would like to become more productive and take advantage of the
facilities provided by an IDE.

Here's the catch: I would like my front end environment (IDE) to run
on Windows, while the target code, debugger, etc. run on Unix. I
simply won't carry a Linux laptop around, although that day is
approaching by becoming feasible. I will not use remote X Windows,
either.

What I would like to do is take a directory filled with source code,
copy it to my Windows PC and use some IDE to manipulate the code.
These are my candidate IDEs:

- Visual C/C++
- Eclipse with the C++ development plugin
- NetBeans with the C++ development plugin
Show full article (1.48Kb)
22 Comments
  Unusual C construct - What is it?         


Author: Ramon F Herrera
Date: Dec 23, 2007 22:07

I was looking at some open source code, and found something that I had
never seen before:

const struct ast_datastore_info dialed_interface_info = {
.type ="dialed-interface",
.destroy = dialed_interface_destroy,
.duplicate = dialed_interface_duplicate,
};

What the heck are those dotted variables (?) fields(?). I don't recall
seeing that in the K&R.

I include the full file below.

-Ramon
Show full article (2.60Kb)
5 Comments
  delete[]         


Author: AS
Date: Dec 23, 2007 21:27

Hello,
consider the following statements,
int *pBuf = new int[10]; //this will allocate 10*sizeof(int) memory

delete []pBuf // this will delete all the memory allocated to pBuf

Question: How come the application knows that it has to delete memory of
pBuf for 10 * sizeof(int) from the statement "delete []pBuf "?

Pls. reply back

John
7 Comments
  Sparse Matrix         


Author: Mark
Date: Dec 23, 2007 19:09

I'm trying to figure out the best way to go about doing this.
I have a "map" for a game, which I'd like to store in a matrix. Some
cells will be empty (NULL), and some will hold objects.
I need a matrix so that I can quickly find neighboring cells.
However, when create this map, I don't know what size it is going to
be, so it needs to be expandable. I also don't know which direction
it's going to grow in, so starting at [0][0] and expanding as
necessary won't work either, because I may later need to use [-1][0].
I don't really care if the indices are re-written if I try to access a
negative index. (ie, if I try to insert something into [-1][0], if it
increased all the indices by 1 so it didn't have a negative index,
that would be fine).
I just need something that's simple to implement, and...
Show full article (0.99Kb)
6 Comments
  access conflict with (LPVOID)this in CreateWindowEx         


Author: Young
Date: Dec 23, 2007 17:25

This makes me very puzzled and angry.Please have a look at :
......
......
_hSelf=::CreateWindowEx(
WS_EX_ACCEPTFILES,
(LPCWSTR)_className,\
(LPCWSTR)"Web Studio 2008",\
WS_OVERLAPPEDWINDOW,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
CW_USEDEFAULT,\
_hParent,\
NULL,\
_hInst,\
(LPVOID)this);
.......
.......
The code is compiled and linked successly under VS2005.But ever time
it runs to "(LPVOID)this" in the function "CreateWindowEx" ,an ...
Show full article (0.66Kb)
6 Comments
  STL vector insert/erase question         


Author: Boltar
Date: Dec 23, 2007 14:29

Hi

Is there a way of inserting and erasing to/from a vector using an
array index instead of an iterator or alternatively a way to map an
index number to an iterator?

eg:

vector v;

v.push_back(123);
v.push_back(789);

v.insert(1,456);
printf("%%d\n",v[1]);

v.erase(1)

So the above would print 456 but 789 would now be at index 2. Then it
would delete 789.

Sorry if this is a dummies question.

B2003
6 Comments
  header file inclusion in c++         


Author: Rahul
Date: Dec 23, 2007 09:48

Hi,

I often include the header files like the following,

#include

However, i get a warning from the compiler to remove the .h and it
works fine with the following,

#include

I also read an article which suggests to do the same, however it
doesn't claim any reason to do so... does anyone have any idea
regarding the same?

Thanks in advance!!!
6 Comments
  is Apache License, Version 2.0 similar to GPL or LGPL         


Author: e2point
Date: Dec 23, 2007 08:25

hi,
if i extend an opensouce project that is given with Apache License,
Version 2.0, will i be able to sell my extended work without making it
also opensource?

thanks
4 Comments
  M I ambiguity         


Author: Fraser Ross
Date: Dec 23, 2007 04:11

struct B1 {
void f();
static void f(int);
int i;
};
struct B2 {
void f(double);
};
struct I1: B1 { };
struct I2: B1 { };
struct D: I1, I2, B2 {
using B1::f;
using B2::f;
void g() {
f(); // Ambiguous conversion of this
f(0); // Unambiguous (static)
f(0.0); // Unambiguous (only one B2)
int B1::* mpB1 = &D::i; // Unambiguous
int D::* mpD = &D::i; // Ambiguous conversion
} ...
Show full article (0.72Kb)
2 Comments
  Bjarne's exception safe sample         


Author: George2
Date: Dec 23, 2007 04:07

Hello everyone,

Here is Bjarne's exception safe sample,

http://www.research.att.com/~bs/3rd_safe.pdf

[Code]
template class Safe {
Show full article (1.45Kb)
3 Comments
1 2 3 4 5 6 7 8 9