Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

button.click is not a property, it's an event handler which doesn't return anything. your program can call the event handler from anywhere, just pass it the two arguments.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Happy (Hic!) New Year. The best part is that the world didn't come to an end in December :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

This is what you want in the General.cpp file, you need to identify the namespace. Dp the same with lowerbound.

int counternamespace::upperbound = 12;

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 10 is incorrect. The = is an assignment, and the == is comparison (boolean). The mikddle part of that loop statement tells how many times the loop is to run, so if you say c == 0 then you are saying the loop continues until c becomes 0. Since the value of c is already 0 (at line 7) the loop will do nothing. You need to put something else there so that the loop will print something the desired number of times. If you want the loop to continue 10 times than do this

for(i = 0; i < 10; i++)

[edit]What ^^^ said :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

post current code

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

std::filestream is not c++, it's CLR/C++ (for .NET) which is a different language.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

gdeneral.h is declaring two variables and that header file is included in both analyzer.h and test.h. The same variables can't be declared more than once or you get that link error.

The work around is to use the extern keyword in general.h and then declare the same variables again but without extern in one of the *.cpp files

#ifndef GENERAL
#define GENERAL
namespace counternamespace{
    extern int upperbound;
    extern int lowerbound;
}
#endif
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Yea, I see that endorse buttons do nothing.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You are probably going to have to pay someone to write the program for you. And you will have to give him/her one of those modules to work with so that the program can be tested. Therre are many freelance web sites where you can hire a programmer.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

My advice is to take a vacation from programming for a little while. you sound burned out and that could be disasterous for your job if you do programming there. All work and no play makes a very boring person.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What database are you using? It should have some sort of administrator panel where you can manually enter and execute sql statements. If it has one then use it to execute the sql you are trying to create. Then when you find one that works change your vb program accordingly.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Depends on the database, you need to check with the database manager (maybe its you) to find out what format the database expects. MS-Addess wants dd-mm--yyyy format while others may want dd/mm/yyyy or yyyy/mm/dd or yyyy/dd/mm or something else. Before sending to the database I suppose you need to validate the text in DateEnd.Text is a valid date and in the correct format.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Not only are fibers invisible to the kernel but they are invisible to all other threads. Fibers can only call other fibers and fibers never exit. Here is a decent article about c++ fiber class.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

atleast you guys don't need to see my dogstich avatar :)

Hallelujah

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

In that particular case, you'd overrun the "abc" array by indexing it beyond the null character at the end.

Not really. It flat won't work (compile errors) because they can't be concantinated like that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Use an IDE that is available on both operating systems, such as Code::Blocks or QT. Actually you might want to learn both CB and QT as well as portable libraries such as wxWidgets and boost. Which you will need to learn depends on what company you work for. So I'd suggest you learn both of them.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Well i think u can check that link if u like and download one of your choice :)

No Dragons (sob!)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Didn't you write that program? The easiest thing to do is just set bookane == "" so that it will look like the row is deleted. If you really wrote all that program you posted then you shouldn't have a very difficult time doing that.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Rows can not be deleted from arrays. The best you can do is to mark the row for deletion, one way to do that is to replace one of the structure members, such as bookname, with "", then as your program searches through the array if bookname == "" then you know that row in the array is marked for deletion. When you want to add a new record re-use the row with bookname == "". When you write out the array to a file ignore the rows that have been marked for deletion.

Another method is to move the row that is to be deleted down to the end of the array, which means you will have to shuffle all the other rows up one row to fill in the gap. You will also want to set bookname = "" so that you know it has been deleted.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

try it in a tiny program and you will find out. The best way to find out such things is to write a little program to test it yourself, you will learn a lot more that way.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm almost 70 and I like animated avatars -- especially the one with a cartoon guy beating his head against the desk with blood spirting all over. Another I though was funny was someone reached through the computer monitor and slapped he hell out of the user.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

believes that world will end before they die and have started preparing for it to survive.

If the world comes to an end then, by definition, there will be no survivors. We (USA) have a lot of nutcases mostly religious fanatics who believe the world is coming to an end -- it will but not for another few billion years.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Just in case the world does not end tomarrow (21 Dec), Merry Christmas everyone, even if you don't celebrate it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Is MainWindow::MainDlgProc() a static method? Only static methods can be used as callback functions.

Check out this link

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

do you mean you want to list all members so that they are ordered by teamid? Or do you just want to select rows which have temaid = 2?

Do you know SQL? If not, then you need an SQL tutorial

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Then just change his code like this: (notice it should be 9 instead of 8)
char SOURCE[9] = "39 04 7d";

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

the declarations are in header files so all compilers will provide them just like they provide all other header files.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

does the same 'iostream' file have codes for both windows and linux?

To us programmers they are all the same code, the operating system is transparent to the programmer. For example your program uses cout the same way on all operating systems, and that's because there is an international c++ standard. The c++ standards committee dictates to all compiler vendors what functions/classes have to be implemented, but do not say how the functions/classes are to be implemented. You can write cout << "Hello World\n the same way with all c++ compliant compilers. We are not normally concerned about how compiler makers implement standard c++ functions/classes , unless of course you write your own compiler or work for a company that make compilers.

you kind of missed this question
Yes, that was my answer to #4, not #3.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

a null pointer value means a pointer whose value is set to NULL, for example

char* somepointer = NULL;

You should set pointers to NULL when they don't point to something useful so that you can tell if the pointer has a valid address or not. If you allocate memory to the pointer using the new operator, then later delete it you need to set the pointer to NULL to insure you don't attempt to access the deleted memory again. Failing to do that is the cause of many bugs and hours/days of hunting down programming errors.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
  1. because it's in the std namespace, as are all the other classes in the fstream and iostream header files.

  2. dont' know, but Mike probably does

  3. Yes, because they are implemented by different compilers. The same iostream is implemnentsed by all c++ compilers, that doesn't mean they are all implemented in the same way. All the underlying code is operating-system dependent. We as programmers just don't see it.

where can I find the real code of iostream

If you have a c++ compiler then you already have it, or most of it. Just read the header files, but be warned that the header files are nearly undreadable. Some of the source code is in libraries or DLLs or shared libraries, depending on the compiler. To see that you will have to spend a lot of $$$ to buy it from the compiler vendors, except for open source compilers such as gnu. In that event, just download all the gnu compiler's source code and read to your heart's desire.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

This is one of the few times C and C++ are different, at least in older versions of C. At one time NULL was defined as (void *)0 e.g.
#define NULL (void\*)0, so it was an error to assign NULL to a non-pointer. Turbo C still uses that since its such an old C compiler. Don't know if the newest C standards kept that or not.

And in segmented compilers such as Turbo C
in Large memory models #define NULL (_FAR void\*)0
in small memory models define NULL (_NEAR void\*)0

When 32-bit compilers and operating systems were invented, the compilers used flat memory models so the definition of NULL was changed to just (void*)0, no mention of memory model because programs were no longer segmented.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I would be in favor of a feature similar to "flag bad post" but for an edit request, for small edits like fixing formatting.

You mean we can't do that now??? Just hit Flag Bad Post and comment "add code tags" or some other editing problem.

I don't like the idea of non-mods editing posts -- too dangerous no matter how good the intent. As I said earlier, all members already have the ability to suggest mods edit posts for some reason.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Oh yes, I know how that goes. You can close the thread youself by marking it Solved.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why are you using an online compiler? There are several free compilers that you can download and compile on your computer, assuming you are using your own computer instead of one located in some public place like a library or at school.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 59: notice the pointer is local to the constructor. As soon as the constructor ends the pointer goes away and all memory alloted to it is lost (memory leak).

Correct the problem by allocating memory for the pointer that is declared in the class, like this:
this->Participants = new Participator*[size];

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

In the program that is in separate files you have to prototype the thee functions that return doubles because the compiler doesn't know what they return and assume they return an int, which is not correct.

Put the three prototypes before main()

double hamCalc(double,double);

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Can you either post the entire program, or PM it to me so that I can test it?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

put some print statements in the functions so that you can see what they are calculating. OR learn to use your compiler's debugger.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Your question doesn't make any sense. The variables you declared on line 8 have a value of whatever happened to be at the memory addresses, it could be 0 but it could also be any random value. That's not a bad thing because the program changes the values by calling scanf(). My only suggestion here is to use "%lf" instead of "%f" because %f if for floats and %lf for doubles.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Now, my first question is, do I try and run the 'burger.c' file or do i compile the created 'burger.o' file because when I try the .o file it says 'cannot execute binary file'.

you don't do either. You can only run the executable. Add the -o filename to the gcc line. If -o is missing gcc will default the filename to a.out So in your example run ./a.out

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There is a time limit, after that you can't edit the post. Just add another post to explain the correction.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Is this what you want?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is a working code snippet. Just remove the const keyword when declaring data should solve the problem.

char data[] = "Callback Function called";

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Do you want to change the wallpaper on the computer? Here is a code snippet. that works for Windows os.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The only one who can make a definitive answer is your teacher. Ask him/her.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You are reading too much into the problem. It doesn't say to increase the voltage every 2 seconds.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The way I read the problem is that the program should print either 0 or 3 depending on the time. There is no equation for that, just a simple if/else statement.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Dani has changed it in the past, but never for a specific holiday.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I think you need to use dynamic_cast instead of static_cast. Read the requirements for derived_class here and here As indicated in the second link if you use virtual functions in base class you may not need casts at all.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Are you trying to do something like this?

class base
{
public:
    base() {x = 0;}
protected:
    int x;
};

class derived : public base
{
public:
    derived() {x = 1;}
protected:
    int y;
};

void foo(base* b)
{
  derived* d = static_cast<derived*>(b); // <<<< this line
}

int main()
{
   derived d;
   foo(&d);
}