Saturday, August 8, 2009

Memory Problem

new char[strlen(vertex_name+1)];

Saturday, August 1, 2009

No rule to make target `preprocessing'

Makefile.win
[Build Error] No rule to make target `preprocessing', needed by `bst.o'. Stop.

#inclue "bst.h"

Wednesday, July 29, 2009

undeclared (first use this function)

undeclared (first use this function)

used the same varaible name for two things - a variable and a struct

phone_number->number = phone_number

Tuesday, July 28, 2009

semicolon missing after declaration of `

semicolon missing after declaration of `

i actually forgot the semicolon after the class declaration

Monday, July 27, 2009

(first use this function)

`xxx' undeclared (first use this function)

happens when you forget to use the scope resolution operator to identify a function as a member of a class

calling type like a method c++

struct contact_node
{
char * first_name;
char * last_name;
int phone_number;
char * address;
char * email;
int fax_number;
call_list calls_made;
contact_node * next;
};

trying to call member function through the type (call list) instead of through the variable (calls_made)

array of lists c++

i tried to use a pointer to a pointer, which was not needed

call_node * call_array[367];

not

call_node ** call_array[367];

Monday, July 20, 2009

writing in the calling routine's memory

?// write in the calling routine's memory (pass by reference) to say
?// here is the data I just got that was at the front

http://bytes.com/groups/cpp/163953-pass-reference-vs-pass-pointer

> Aside from the NULL PTR safety of the reference version, is there a
> performance advantage in the way the function and parameters are
> placed/copied onto the stack for either version?

No, but I can imagine the reference version to be easier to optimize (because
no analysis is needed to check what the reference refers to in each
statement), so it might be that it's better optimized with some compilers.

However, the NULL pointer safety is important, and there are other
non-efficiency related issues.

One particularly important such issue is that the reference cannot be
re-seated within the function. Another is that arithmetic cannot be performed
on the reference, only on the object it refers to (think of e.g. a std::string
argument). A third is that the reference signature clearly indicates a single
object, whereas the pointer signature matches object or array or null.

Sunday, July 19, 2009

erminating

error code using Dev C++:

No rule to make target `erminating', needed by `main.o'. Stop.

This happened because I had a stray apostrophe character : " ' "