Take this code for example
#define upleft buffer[a-1][b-1]
#define upcent buffer[a-1][b]
#define upright buffer[a-1][b+1]
#define left buffer[a][b-1]
#define right buffer[a][b+1]...
Type: Posts; User: krygen
Take this code for example
#define upleft buffer[a-1][b-1]
#define upcent buffer[a-1][b]
#define upright buffer[a-1][b+1]
#define left buffer[a][b-1]
#define right buffer[a][b+1]...
of course. i forgot that references are implicit pointers. that was a pretty bad question. just goes to show what happens when you come back to c++ after a break :(
Hey all, I was just wondering why this won't compile.
int a=5;
const int &b=a;
int &c=b; //uh oh! why can't you reference a const ref?
when you have a statement such as
class_name ob1 = class_name(5);
would it be better to think of that as more of the *syntax* for a way to call the constructor, instead of trying to break in into...
Ok, well I know that this statement:
class_name ob1 = class_name(5);
calls the class_name(int) constructor, but what I don't understand is how.
I've been told that such a statement as...
thanks guys, great explanations
this question got me thinking
how does the debugger access the code if it's already compiled? I mean, I can see how it accesses the headers... but the actual C libraries? Does it actually go...
I've already asked some people about this on AIM but I decided to just formaly ask it on the boards as well. I have several questions ;)
Whenever you initialize an object of a class, e.g
...
well, that's what i was wondering. if I have a file in my project but i never refer to it, will it be linked?
Disclaimer: the following post is a ramble. Please feel free to comment on whatever part of it you wish ;)
I noticed that if I assign an enumeration variable to a fundamental type variable, it's...
i understand now. thanks everybody + dave evans u were esp. helpful
yes, i am aware that the for loop is attempting to access elements of the array that are undefined.
However, these attempts to access the array, although technically not correct, are allowed by my...
Alrighty, I've built a simple ascii model of a cellular autonoma:
int cells[50][50];
int main()
{
Hello to all the vc++ .net users on this forum:
Is there a way to see all of the linked files when you build a project? Your .cpp files and standard library files, etc...
thanks :)
Hey everyone, sorry if this is off-topic, but I didn't really know where else to ask this. I figure all you windows programming guys will know the answer ;)
It's about ms visual c++ .net, and...
alright, thanks.
prelude: the program i posted above gives a linking error when you build in vc++ .net 2003? because if it does i must have just been mistaken in thinking it worked.
yeah, i compiled and linked... weird...
are you using visual studio .net 2003 prelude?
bithub: right ;)
im not near my compiler right now, but it is visual studio .net 2003
The code was something like this:
first file
I have two questions :D
First off,
When you include a header file in your program, does the compiler then link the program to the library that it intails? Or are the libraries always linked?...
har har.
I supposed I figured that linking with the standard library is the same as linking to another file. e.g when I create my own function in another file and link it, all i need to do is prototype it in...
I canīt believe this, but I just found out that the internet cafe has a copy of vc++6 on it! wow! (not joking)
so anyways, i have another question.
headers include function prototypes for...
When using functions that are in the standard library, I find that to use them I sometimes have to include the appropriote header, and sometimes I do not. e.g the strlen() function: I can use it...
I was just wondering why, when using object pointers, you must use the -> operatior. Why couldnīt you simply follow the standard method like: *p.funct() if you were accesing the funct() member...