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

30% of americans already see it as an insult to their religions.

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

*70 and up - already have funeral, plot and stone paid.

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

I didn't say we would abolish Christmas -- just the federal holiday due to separation of church and state. The First Amendment to the US Constitution states: "Congress shall make no law respecting an establishment of religion". IMO declaring Christmas as a federal holiday violates that law. (Public Law 90-363)

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

Christmas has an interesting history. It was not a holiday in early America, and in fact was outlawed in Boston for a few years. Christmas didn't become a federal holiday in America until 1870. I anticipate one day in the not-too-distant future Congress will pass a law abolishing it as a federal holiday for political correctness.

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

It makes you wonder why so many people who claim to believe in God/Jesus are so afraid of dying

It's a natural thing, just as natural as breathing. All creatures have a fear of death.

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

Do you recommend me to read MSDN ?

Yes, it's the official source for MS-Windows GUI. Also look for tutorials and examples. Microsoft has lots of example programs. And you will find lots of examples at CodeProject.com, which is probably the largest repository of free Windws example code that you will find on the internet.

learned most of their programming knowledge on Internet

That may be ok, for a hobbyist. Some people learn better and faster by reading books. If you have lots of time on your hands and don't mind spending hours and hours searching for answers that are easily found in a book, then do it.

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

No there isn't. If you don't know what you are talking about

A simple google shows that quote was written by French author Jacques Anatole Franois. Now whose calling the kettle black.

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

To write a GUI using pure c++ is pretty difficult. Here is an into tutorial, and it only scratches the surface.

Writing Windows GUI programs is a lot simpler with other languages, such as CLR/C++, C# or VB.NET.

Here is a pretty good overview of .NET, and if you google for "what is .NET" you will find lots of other articles. In 10 words or less, .NET is a replacement for win32 api.

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

rel(this,z==res[count]X1[count1]);

It was probably the == boolean operator that caused the problem

rel(*this,(z=res[count]*X1[count1]));

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

Oh no! Not another Elvis nutjob :) I don't know why people are so crazy over that truck-driver-turned-singer. He wasn't all that good of a signer, and a horrible actor. The final straw was when he died of drug overdose. Why would you want to memoralize someone like that???

If you want to dedicate your website to someone, dedicate it to Mother Teresa, someone who is worthy of it.

<M/> commented: Yeah... elvis is horrible. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It's just a simple SQL statement. If you don't know SQL, then you need to read a tutorial on it.

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

"Home Premium and lower editions can't connect to domains."

Ok, I was thinking of Windows 7 Pro. Sorry for misleading you. You will need to upgrade the computers from Home edition to Pro. And if you are going to do that you might as well upgrade them to Windows 8.1 Pro. There's a big of retraining needed but the learning curve isn't all that great.

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

home Premium should not be a problem. Only one computer needs to run the Server software -- I don't know whether it can manage passwords without human intervention or not in case someone forgets his/her password.

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

Are the printers wifi ready? Or are they connected directly to computers? What operating systems are running on the 6 computers?

With MS-Windows 7/8 you don't really need a computer to act as a server, just set up a home network and all the computers on the network are considered servers which can share files and printers with each other.

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

Are you asking how to get Notepad to recognize fonts and colors in the text you saved from RighEdit control? That will never happen.

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

The reason is usually performance, but that's not as common as some would have you believe.

At least not any more with present-day fast computers. When I started out in the 1980s computers were ungodly slow, so we had to get every bit of speed that we could muster. Many of the things we did back then I wouldn't bother with today.

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

Are you trying to put the cust id in one control and cust name in another? That could get confusing to keep them straight. Much easier to put them in a grid control and let the grid control keep then together. And you can do it all in just one SQL statement. You can even bind the grid control to the database so that you don't have to loop through the result sets.

If you want to know how to do that, then see this excellent free tutorial

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

White space includes space, line feed, and tab characters. So testing for just space isn't right. And line 5 uses the assignment operator = instead of the boolean operator ==.

The easiest way to test for white space is to use the standard macro isspace()

char char1;

// iterating through a file

if ( issapce(char1) )
{
cout << "WHITE SPACE" << endl;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

It's because you're using eof() incorrectly eof() doesn't know it's end-of-file until an attempt is made to read it. A better loop is like this. Note: eof() is unnecessary, at least I've never found a use for it.

while(in_file>>eve>>am>>dat>>bal )   
    {
        cout<<eve<<setw(10)<<am<<setw(20)<<dat<<setw(10)<<bal<<endl; 
    }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

In the few posts which I have had on here asking for help I have generally had to solve the problem myself (and that is always the best way right?)

Actually -- yes, that is right. We are here to "help" you solve the problem, not solve it for you. You learn a great deal more if you are forced to research the problem and write the code yourself. Programming is all about problem solving, not about getting someone else to do your work for you. How long do you think you will last on a job if you can't solve programming problems?

Additionally, almost everyone here are unpaid, they post here and try to help you out with only the goodness of their own hearts. So don't get mad when volunteers ask you to post the code you try so that they can help you. Instead, you should be greatful for whatever help you get. If you want paid tutors then it's going to cost you a lot more than you have to pay to ask questions on DaniWeb (which is free).

And don't get too upset if someone disagrees with you. Heaven only knows the number of times I've been critisized for things :) I'm not right about everything, and all the regulars here knows it. My post cound only means I'm a blabbermouth, has no relationship to being an expert at anything.

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

(really bad) movie, Idiocracy

I thought it was hilariously funny :)

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

Why would you want to do that? Older versions may not be compatible with Windows 8.

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

According to the link you providexd prussian blue is used in lots of things

Because it is easily made, cheap, non-toxic, and intensely colored, Prussian blue has attracted many applications. It was adopted as a pigment very soon after its invention and was almost immediately widely used in oil, watercolor and dyeing.[18] The dominant uses are for pigments: approximately 12,000 tonnes of Prussian blue are produced annually for use in black and bluish inks. A variety of other pigments also contain the material.[12] Engineer's blue and the pigment formed on cyanotypes—giving them their common name blueprints. Certain crayons were once colored with Prussian blue (later relabeled Midnight Blue). It is also a popular pigment in paints. Similarly, Prussian blue is the basis for laundry bluing.

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

You ain't seen "weird" yet :)

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

Is the ip address, user ID and password correct? I hope you didn't actually post the correct password.

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

Can you see the program in the Services program? (Search for "Services" then select the item "View Local Services")

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

Scan your computer for visuses and malware. What version of MS-Windows are you running?

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

How smelly is durian? Here's a youtube video.

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

A boy died about a month a go from hitting a car head on WITHOUT a helmet.

Darwin's theory of Survival of the Fittest at work.

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

WallMart doesn't sell walls either. If the names of businesses had to represent what they sell then there would be very few businesses.

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

Just replace textBox1.Text with string objects. Using ddanbe's suggestion

List<string> items;
                    foreach (string ln in split)
                    {
                        string n;
                        if (count > 4 && count < 8)
                        {
                            n += (ln + Environment.NewLine);
                        }
                        items.add(n);
                        count++;
                    }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

List<string> CVSValues

Looks like C++ to me, does C# have similar containers?

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

By using ReadToEnd() you lose track of individual lines, so you'd have to know beforehand how many columns are on a line then extract them from the array as if everything was in one big line of the file. So you'd have to set it up something like this:

 const int ColumnsPerLine = 10;
 int count = 0;
 foreach (string s in stringArray)
 {
    ++count;
    if (count > 4 && count < 7)
       textBox1.Text += (s + Environment.NewLine);
    if( count >= ColumnsPerLine)
       count = 0; // reset for next line
 }

I would think it would be a lot more understandable if the file were just read one line at a time, like in your original post.

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

Are you mixing C++ and C#? No need for that loop.

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

If you have a lot of items to display then use a listbox instead of a textbox so that you can see them all. textbox doesn't have a scrollbar.

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

If you don't care about which values are on which lines, then why not combine lines 3 and 4 so that it does split only once?

            StreamReader sr = new StreamReader(filepath);
                string fileString = sr.ReadToEnd();
                string[] stringArray = fileString.Split(new char[] {',','\n'});
                int count = 0;
                foreach (string s in stringArray)
                {
                    if (count++ > 4)
                        textBox1.Text += (s + Environment.NewLine);
                }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That joke is older than I am :)

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

The code I posted will do exactly that. Why are you using an array of lines?

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

If you want each value to appear in the text box on it's own line, then below is one way to do it. I couldn't get it to work the way you tried it.

            using (StreamReader readFile = new StreamReader("C:..."))
            {
                string line;
                while ((line = readFile.ReadLine()) != null)
                {
                    string[] split = line.Split(',');
                    int count = 0;
                    foreach (string ln in split)
                    {
                        if( count++ > 2) // ignore first 3 columns
                            textBox1.Text += (ln + Environment.NewLine);
                    }
                }
            }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

See the examples here how to split the string into it's individual tokens

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

Gummi Bears, of course.

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

What does the acrnym IBM stand for? A: It's Better Manually.

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

Fruit Cake.

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

And we've seen in California, and now in Washington, what happens when the people start demanding the labeling of food.

What are you talking about??

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

We don't have Taco Bell here. It's because of consumer protection laws against false representation. Basically, you cannot sell a "beef taco" if you cannot show that it actually contains beef. That's why Taco Bell (and a few other american chains) don't exist in Quebec.

That's just stupid! How can Toco Bell NOT prove that their tocos contain beef? What else could they contain -- kangaroos or horsemeat? All the inspectors have to do is watch them make it and test the ingredients.

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

That paradox has been the subject of several time-travel movies, such as Dr. Who. When time traveling you're not allowed to alter history, it's caled a Temporal paradox

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

Taco Bell and poor service.

Service is ok at the Toco Bell where I live. Another store is combined with KFC.

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

Most desserts are bad for us, but we can't live forever so might as well enjoy it :)