|
|
Up |
|
|
  |
Author: Ramon F HerreraRamon 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 |
|
  |
Author: Ramon F HerreraRamon 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 |
|
  |
Author: ASAS
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 |
|
  |
Author: MarkMark
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 |
|
  |
Author: YoungYoung
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 |
|
  |
Author: BoltarBoltar
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 |
|
  |
Author: RahulRahul
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 |
|
  |
Author: e2pointe2point
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 |
|
  |
Author: Fraser RossFraser 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 |
|
  |
|
|
  |
|
|
|
|
|
|
|