include

Boost linkage error in Eclipse

I've been banging my head fruitlessly against the wall attempting to include boost's thread functionality in my Eclipse C++ project on Ubuntu. Steps so far: Download boost from boost.org ./configure --with-libraries=system,thread make sudo make install sudo ldconfig -v In the eclipse project, set the include directory to: /usr/loc...

Why does Xdebug throw an error for a file that's included, not required

I'm running LAMP server on Ubuntu 9.04(Desktop edition). I'm very new to Ubuntu, so I did most of this via the Synaptic Packet Manager. I then removed php5-common and just installed php5 via: apt-get install php5 My error reporting is set to: error_reporting = E_ALL & ~E_NOTICE I installed Xdebug and inserted the following in my php.i...

Including Files in Ruby Questions

I am very new to Ruby so could you please suggest the best practice to separating files and including them. What is the preferred design structure of the file layout. When do you decide to separate the algorithm into a new file? When do you use load to include other files and when do you use require? And is there a performance hit whe...

Asp Classic Include Once

Does ASP Classic have a feature that is the equivalent of PHP's "include once" feature? ...

How come my HTML Include wont work?

I am making a site right now and I want to include the sidebar in every page. I have looked everywhere and everyone says to use the following code: <!--#include virtual="insertthisfile.html" --> I have done this but to no avail. I am using dreamweaver for easier uploading and managing of my files, and it shows up in dreamweaver. I wou...

"seekg identifier not found"

I have a program called main: #include<iostream> #include<fstream> using namespace std; #include"other.h" int main() { //do stuff } and then other.h: char* load_data(int begin_point,int num_characters) { seekg(begin_point); char* return_val=new char[num_characters+1]; mapdata.getline(return_val,num_characters); return...

How to Include a file outside the application (war) using jsp include

I am using "jsp:include" to include a static file in one of my jsp files. It works fine when the static html file is located inside the application folder. However if its kept outside the application folder it is not included in the JSP file. Note: I have created a context for the folder where the static file is saved and I m able to v...

How to include PHP file in SHTML pages?

I have a shtml file index.shtml in which I want to include a PHP file which performs some programing and returns HTML data. I am trying to include my PHP file but I don't know how to do that, I tried following but nothing is working, Following line is just printing an error, "[an error occurred while processing this directive] ": <!--...

C++ question... definition doesn't recognize vectors specified in declaration

I'm working on a class assignment that started small, so I had it all in one file. Now it's gotten bigger and I'm trying to separately compile main, functions, and classes (so all the classes are together in one .h and one .cpp) I have one class B, which is the parent of a lot of others and comes first in the file. One of its data member...

C++ : Code reuse, classes and libraries

Hello. Although I consider myself an experienced programmer (lead programmer of 2 commercially released games), I feel lost now that I have started using C++ for my next project. Right now I want to create a class to read/encrypt/decrypt JSON-like text-based data files (a custom format I have designed for my needs). Let's say it's calle...

Eager loading not working in Rails 2.2.2

I'm working with models analogous to the following: class Owner < ActiveRecord::Base has_many :owned end class Owned < ActiveRecord::Base belongs_to :owner end You can presume that owned_id and owner_id are in the right places. The trouble is that, in a controller for a different mvc chain in the app, @owner = Owned.find_by_id(...

Why does the order of my #includes matter? (C++)

I've created a header file called "list_dec.h", put it in a folder "C:\Headers", and set my compiler to include files from "C:\Headers", so now I can do things like #include<list_dec.h> int main(){return(0);} but when I try to do something like #include<iostream> #include<list_dec.h> int main(){return(0);} I get an error (not anyth...

Making references to classes you havn't #include'd (C++)

I'm playing around with Box2D for fun right now, and after getting the hang of some of the concepts I decided to make my own test for the test bed (Box2D comes with a set of examples and has a simple extendable Test class for making your own tests). I started by grabbing one of the other tests, ripping out everything but the function sig...

Is there any situation in which it would be useful or necessary to "double link" header files? (C++)

I use the term "double link" because I don't know what the actual phrase is, or if there is one, but assuming you have two headers, head1.h and head2.h, with these contents: In head1.h: #include"head2.h" //do stuff In head2.h: #include"head1.h" //do stuff I visualise it as two mirrors placed opposite each other, as it's not really...

PHP: Only include files when running phing?

I have the following folder structure: /main /loader.php /build.xml /components /package1 /class1.php /package2 /class2.php /tests /package1 /class1.test.php /package2 /class2.test.php When I run the web application I load loader.php at fir...

What is the difference between a .cpp file and a .h file?

Because I've made .cpp files then transfered them into .h files, the only difference I can find is that you can't #include .cpp files. Is there any difference that I am missing? ...

What happens if more than one .cpp file is #included?

Becase I've seen (and used) situations like this: In header.h: class point { public: point(xpos, ypos); int x; int y; }; In def.cpp: #include"header.h" point::point(xpos, ypos) { x = xpos; y = ypos; } In main.cpp: #include"header.h" int main() { point p1(5,6); return 0; } I know the program executes ...

Include one java file in another java file

I'm pretty new in Java, so perhaps this question is not make me sound very stupid. How can I include one java file into another java file? For example: If I have 2 java file one is called Person.java and one is called Student.java. How can I include Person.java into Student.java so that I can exstend the class from Person.java in Stude...

"Namespaces", constants and multiple PHP includes.

I have some PHP code similar to the following: foreach ($settingsarray as $settingsfile) { include ($settingsfile); // do stuff here } $settingsarray is an array of file names from a particular folder. The problem is, that each $settingsfile defines constants (with the same names), which of course, can not be redefined. Wh...

PHP include_once: handling of imports i.e. for configuration files

Let's assume we have the following structure: index.php config.inc.php \ lib \ lib \ common.php Several parameters like database name, user & co are configured in config.inc.php. What is the proper way to access them i.e. from a function located in \lib\common.php. Do I really have to do an include_once("config.inc.php") within each f...