so if my lib file is called "LibFile.lib" and there is a class in that lib file named "ClassInLib.h" then I would link my project to the lib file, and then just #include "ClassInLib.h" anytime I...
Type: Posts; User: cjschw
so if my lib file is called "LibFile.lib" and there is a class in that lib file named "ClassInLib.h" then I would link my project to the lib file, and then just #include "ClassInLib.h" anytime I...
I want to access some classes/functions that are stored in a lib file. How do I do that? Do I just set up my project so that it is linked to the lib file (that didn't seem to work)? and then I can...
I apprieciate everyone help. And I am looking into everything that has been suggested, but I want to make a quick clarification with the class names and the error message that I am getting. The class...
I'm not sure if this is going to do much good but there is the header file that, when included, causes problems.
#ifndef METAINTENT_H
#define METAINTENT_H
#include"MetaIntentObject.h"...
This particular header file has be "#included" else where without any problems. But I will check. I feel like this is the type of error that occurs when there are "multiple inclusions" of the same...
syntax errors look like this:
error C2061: syntax error : identifier 'HeaderName'
and I get about 500 of them. "HeaderName" is the class that I am modifying and added the new "#include"...
I am modifying a file in a large c++ software program. I need to "#include" a data class into the header of the file I am working with, but when I do that (and compile) I get a ton of "syntax"...
I get the impression (from previous posts) that when working with large numbers of header files, the coder should always include header "guards" to keep them from being included more then once....
(in reference to "the other point there"). Things only get screwed up if the "master/origonal" DataClass gets deallocated right? If I just create a pointer to that class, and the pointer gets...
Quick [dumb] question: I have a huge data storage class (lets call it DataClass). If I declare a pointer to that class, would that pointer take up a lot of memory (I am having memory problems so I...
Thanks for the help. Some addition follow up questions. What is the difference between a deep and a shallow copy? Is it true that anytime I am overwritting the operator= so that I get a deep copy, I...
I am having a problem with pointers (I think). I have "(1)" an instance of a data class, and "(2)" a pointer to a data class (the same data class that "(1)" is an instance of). This data class is...
I would like to run some preformance tests on a program that I created. I am interested in getting information concerning how much memory my program uses, where my bottle necks are, how long it...
sorry I forgot to add that
data would just be a typical element of the data class (such as "double");
class MyGlobalClass{
private:
;
public:
how do I create and use a global class? I have only created global variables, never a class; I tried to use the same formate but came across errors.
what I tried to do was declare the class at the...
thanks, thats exactly the kind of suggestion I was looking for
in your ph.cpp you declare "double value1 = 0.0" as a global variable, and then in "pd.h" you declare "extern double value1". Maybe I am confused, but what is the point of that, don't you only need...
it is hard to post what I tried because this problem deals with inheritance across multiple files. But I'll try to give an example.
this is basically what I tried:
#include "xxx.h"
//...
This is what I am trying to do:
Input global variables from a data file, and use those variables throughout my software.
What I have done: I have created a class that has the global variables...
Happy Holidays, I (regretfully) hope that others are working too, because I have a quick question:
I am currently using the "tm" struct of ctime to store my time and date information. But the...
time_t now;
struct tm *tm_now;
struct tm *tm_later;
now = time ( NULL );
tm_now = localtime ( &now );
tm_later = localtime ( &now );
tm_later->tm_hour = 12;
I would like to store multiple "struct tm*" time data objects in a data class. These object would need to hold different times (lets say a start time, and an end time). But it seems like anytime I...
I am trying to use the <ctime> struct *tm storage class. I am having problems with getting consistant results when accessing the members of the struct. When printing out the time in a loop, I get...
What is the best way to avoid the: 'class' type redefinition errors? This comes from anytime I include a header for a file that has already been included somewhere else. First of all, why is this a...
Normally I try to stay away from global variables but it seems like making a mutex variable global makes perfect sense (and then just doing an "extern pthread_mutex_t mutex"). Does anyone forsee any...