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

Nope -- get another hobby.

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

but there are still those freewares that force-install adware with and w/o your notification.

Stop installing all those freewares, you are just asking for trouble.

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

I think it wants you to just do this:

ostream& operator<<(ofstream& out, CheckingWithInterest& wIAcct)
{
    // write out the data from wIacct.
    out << ?????
    return out;
}

int main()
{
   ofstream out("filename.txt");
   CheckingWithInterest c;
   out << c;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

most of my infections come from adware installers from "free" programs

DON'T DO THAT ANY MORE!

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

The << operator overload has one simple task -- write to the stream that is the first parmeter to the function. If you add other things to the function then it is doing too much.

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

Are the values you put in lines 3-7 correct for the server you are trying to access (I assume you just posted dummy values here) ? Can you connect to the server manually?

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

AFAIK there is no such thing.

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

How does C++ not have lots of concepts you're assumed to know?

@deceptikon: I said C#, not C++. And the first thing in C# you need to know is the concept of classes. You can't write a simple Hello World program in C# without knowing something about classes.

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

Install CCleaner -- it do0es a pretty good and thorough job at removing junk (e.g. temp) files, unneeded cookes, and other things.

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

Tornadoes are as common around here as earth quakes in California. They can be devistating if you are at ground 0 but otherwise harmless.

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

Before c++11 you would have to use an os-dependent function to create a thread, or use boost thread class. For exampe, in MS-Windows you could call the win32 api function CreateThread() (windows.h header file)

Install VC++ 2013 which supports std::thread. Or use lastest Code::Blocks with MinGW (GNU) compiler

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

name is a single character, it is not an array (see line 7). Therefore you can only enter a one-character name. I doubt that is what you want. Also, Stud_Names is an array of pointers, so if you assign names to each pointer then all pointers will contain the same name. For example if you enter two student names, John and Mary, then Stud_Names[0] and Stud_Names[1] will both point to "Mary" because names contains the word "Mary".

In C++ you have a couple options:

1.change Stud_Names to be an array of std::string objects
std::string Stud_Names[100];

2.leave Stud_Names as an array of pointers, then call strdup to duplicate the names: This is the same as malloc and strcpy.

Stud_Names[i] = strdup(name);

Now for Stud_ID: This is a 1d array of 100 characters, yet you are treating it as a 2d array. Line 24 won't work because all you can enter for &Stud_ID[i]) is a single digit and the scanf statement uses "%c" not "%s".

scanf("%c", &Stud_ID[i]);

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

You could just read them into some array of structures or class then sort them in memory. If you want to know what a particular person signed up for then sort the items by name, not by type.

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

It's called a bootloader (see this link). I never wrote one, so I can't really help you out with that.

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

what database are you using? What compiler and operating system?

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

Cool again here today, had to turn the furnace back on last night to take off the chill. Yesterday there were some tornadoes about 20 miles away that killed 6 people.

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

I don't get how to make them match with each other.

You will need two loops, one inside the other. The outer loop will step through each of the digits in winningDigits array. The inner loop will attempt to find the current digitit in winningDigits in the player array. If a match is found then put that digit in a third array so that you keep track of the matching digits. Something like this:

for each digit in winningDigits array
{
   for each digit in player array
   {
       if current digit in player array is the same as winningDigits array
       {
           add the digit to matches array

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

variable named tau is a static variable, which means all instances of the class share the same value of tau. It retains only the last value that was assigned to it, regardless of which class instance assigned it. So if you initialize tau to be 10, then assigned 2, only the 2 will be retained.

smitsky commented: Thanks! +1
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

C# is a nice language -- if you already know C++. As a first language I think c++ could be easier and faster to learn then C#. If you have never learned a programming language before there are lots of concepts that C# assumes you know. An intro course in either C or C++ will give you a good background before delving into C#.

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

What language did you write the program in? You need to post the code you have written -- what you posted is ok, but doesn't help anyone to determine the cause of the problem.

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

I assume the array of winning digits can not contain duplicate numbers -- for example this would be illegal: 7 1 4 7 2 5 because the number 7 appears more than once. If that is correct, then you need to expand the loop on line 12 to check the array to see if the value returned by line 13 already exists in the array.

line 15: a[10] accesses one element beyond the end of the array, that is, there is no 10th element. Remember, arrays always start numbering with 0, so the last elment in that array is a[9].

Why does arry a contain 10 elements when only the first 5 are used?

You need to add something before line 15 to get user input for 5 digits. Again, you will probably want to check for duplicates.

It probably doesn't matter if the digits in the two arrays are in the same order. So you might use a 3d array to check off the digits that appear in both arrays. You could use a bool array for that.

bool checks[5] = {false};

Now loop through both the first two arrays. If the first value in the second array (user inputs) appears anywhere in the first array (winningDigits) then set checks[0] to true. Do that for each of the other digits in the user inputs array. When done, all you have to do is count the number of true values in the checks array.

Once you get all that done …

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

you have the word const in the wrong place

void Draw() const

See this tutorial

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

You need to either use your compiler's debugger so that you can view the values of variables, or just put some print statements in the program to print out the value of variables. I can't tell you why if(hun == 3){ (line 51) doesn't work the way you think it should.

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

There has to be two versions of the file so that diff can tell you the differences. How would you expect diff to work with only 1 file??? The two files don't have to have the same number of lines, at least not with the diff pogram I've used in MS-Windows.

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

In the lower right hand side of of your window, last section on the right in the task bar, ...

I never noticed that before.

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

lines 16-19 and 50-54. Remove the const keyword before void.

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

diff is used to find the differences between two files. So you will need a copy of the file before the changes were made and a copy of the file after the changes were made.

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

In c++ stucts can even have methods just like class. The only method I use in a struct is a constructor to initialize all the data. If you add other methods then you'd be better off just renaming the struct as class.

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

line 11: What??? That like saying while( 1 != 2) You could just delete lines 11 and 13 without changing that function.

unsigned int timer(){
    clock_t t;
    t = clock();
    unsigned int curtime = 0;
    return curtime += t;
}

And the above reduces to this:

unsigned int timer(){
    return clock();
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I've always understood you go in and click to remove USB hardware from the computer,

click what? Not saying that's wrong, but I don't know what youre supposed to click.

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

I tried to use it in my MDI application, but I failed.

Why did it fail? Did you get compile error(s)? Did the example demo program work?

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

The first thing you should do is learn about tennis scoring rules. google for "tennis scoring rules" and you will come across this site, among several others.

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

I was a clean install all right.

If you did a clean install then the installer should have reformatted the hard drive before installing 64-bit Windows 7. If you have c:\windows.old then you did not do a clean install.

Many (but not all) the 32-bit drivers/programs you had may not work with 64-bit version -- you will have to download and reinstall the 64-bit version of those drivers/programs.

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

I was thinking that too -- I have a Chinese medical doctor whose last name is Hu.

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

Here is a C# drag & drop from FileExplorer tutorial

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

thunder stormes and rain all night. I had to turn on the air conditioning to take out all the humidity. Reminds me of this song.

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

Have you seen any of these examples? At some point you just have to bite the dust and learn how to manipulate the serial ports so that your program can communicate with whatever is on the other end of the serial cable. A pure OOP library is not going to help you learn how to set the baud rate, stop bits, data bits, handshake, and parity. The value of those must match whatever is on the other end of the serial cable. After that, it's just a matter of reading from and writing to the port. You have to know how to talk to the hardware on the other end of the cable.

If you are going to use QT why are you trying to use C#? AFAIK QT uses a c++ compiler.

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

"hides the variable" means that if you have two variables with the same name, one global and another local, then the compiler will always use the local variable and ignore the global variable. In your case there is one variable named "total" that is a member of the class, and another variable with the same name that is declared in the function (or as a function parameter). This is one very good reason to never, ever have two different variables with the same name -- it just causes lots of bugs.

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

It doesn't fix anything -- just tests the RAM chips to see if any are bad. If it finds bad ram chips then it's up to you to replace them. See the Download Now green button here.

Can I download it and burn it on a Mac

You can probably download it, but if you burn it on MAC I don't know if it will run on a PC.

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

download memtest32. You will have to put it on a bootable disk or DVD then boot from that. It performs a very thorough check of the computer's RAM. You will probably have to download it from some other computer and burn the iso file to DVD.

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

The variable total on line 11 hides the variable total declared on line 10. Just delete parameter total on line 11.

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

I guess I have found the limit of a overload.

That's not the problem. Lines 43-46 pass 5 arguments, line 11 wants 6. Remove the last argument on line 5 and make total local to that function. But what is that function doing with total? It's a useless variable that disappears as soon as the function returns.

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

Snickers Dark Cholote -- OMG it's sooooo great! First time I ever tasted it.

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

Yes, it's just one big fried onion. Very good, very tasty, and very heavy on the fat/calorie contents.

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

Looks like the problem is repeatValue() template. Why is that a template?

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

When I try to compile my code in visual basic 2010 it gives me the error 1903

I think you meant to say Visual C++ 2010

Error 1903 just means there were too many previous errors and the compiler gave up. Usually the first error is the most relevent.

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

afx_msg is just a user-defined data type. Normal c++ stuff.

right click afx_msg and the IDE will take you to where it's declared and defined. If you dont' know what something means then just right click on it and select "Go to definition".

MFC has a very very long learning curve, it takes about a year of constant studying MFC in order to learn it pretty well.

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

MFC uses a system of event message maps in the CView-derived class. For example in a newly created MFC SDI doc/view program, you will see this in the *.cpp file

IMPLEMENT_DYNCREATE(CMFCApplication1View, CView)

BEGIN_MESSAGE_MAP(CMFCApplication1View, CView)
    // Standard printing commands
    ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)
    ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)
    ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CView::OnFilePrintPreview)
END_MESSAGE_MAP()

When an event occurs, such as a keystroke, the MFC message pump will eventually search the message map to see if an event handler has been established to process that event. In the code above the only event handlers enabled are for three of the menu options. So when you click on the File Print menu item MFC will call the function named OnFilePrint().

Now if you use VC++ IDE and right click CView::OnFilePrint then select from the popup menu "Go To Definition", VC++ IDE will take you to the line where it's declared, in this case stdafx.h

    // not mapped commands - must be mapped in derived class
    afx_msg void OnFilePrint();
    afx_msg void OnFilePrintPreview();
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 35: where is the array of curr->action ever set to anything other than NULL?

Where is the value of max set (line 35) ?

line 37: wrong delete. Since curr is not an array (see line 8) then that should be just delete curr; But that's not possible either because you changed the memory location to which curr originally pointer (line 35). You need another temporary pointer to hold the original address of curr that was set on line 8 so that it can be deleted on line 35.

If the action array is ever allocated new memory then you need to delete those too.

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

but we can do something like that with MFC, right?

Wrong. MFC is just c++. If you can't do it in c++ then you can't do it in MFC. Show us an examplem of where MFC avoids redeclaring a functionl.