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

This is why the tax rate should be at 10 percent or below. Above that, government reduces the size of the economy. It's also why universal health insurance can't work.

I disagree about universal health care -- take France for example. Their tax rates are 25% higher than ours (maximum is 48%) yet they manage to pay for a universal health care program. Whether we really want one like that is a different discussion.

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

See what I meant about making it more complicated?

More complicated than what? MS-DOS ? you can't really make that comparison because they are two entirely different animals. That's like trying to compare Horse & Buggy with a Mercedes Benz.

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

>>print the day of it. That's what happens when you try to paraphrase the assignment.
I misunderstood that -- I did not realize it meant the day of the week.

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

[offtopic]Hey Dani -- is that a new kind of tag ? [ search ] This is the first time I've seen it used. Really neat :) [/offtopic]

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

First declare three integers -- day, month and year. Then call scanf() to get user keyboard input. Finally call printf() to display the day.

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

you don't really need those loops at all if you use fgets() to get the entire line at one time instead of one character at a time with getch(). It also processes backspace correctly, which your code does not.

>>Both gender and age are strings : gender[5], age[2]

Make sure the buffers are at least as large as needed to hold all the characters plus the null terminator. If you want age to hold two digits then it needs to be a minimum of 3 bytes. gender needs to be at least 7 because "female" is 6 characters.

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

the government either just talked about or did actualy made a bill that said you could get the same rights as a married couple if you lived together. Huge debates about it very recently.

Some states here have similarcommon law marriages


Also, who said I'd be punishing anyone?

Living with someone you don't like is punishment, whether you intend to do that or not.

I was almost married twice, but then got scared of the "... till death do us part" thingy! I just enjoy my freedom too much!

I think they've changed that part -- now its "... till we get sick of each other"

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

>>can anybody help me to write the following program
Yes someone here will help you but you first have to post your code and ask questions about what you don't understand. We will not write the program for you.

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

line 187: you forgot the parentheses after the function name. Same with all other functions, so I won't tell you the line numbers.

>>I don't know how to declare the funtions before it reach the int main?

Pretty easy -- just copy the line with the function name to somewhere above main() and add a semicolon after it. For example, after correction line 146 copy it and past to line 7, then line 7 will look something like this: int English (); . I recommend copy/paste method instead of fresh typing to avoid typing mistakes.

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

Not very patriotic, but you proved that even a Programming Guru can have a sense of humor!

I don't think it was intended to be patrotic but just humerous. And yes many old people do laugh occassionally -- we're not all sourpuses. :)

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

maximum is the size of the screen and its resolution, usually 25 x 80. The 35X25 was common when PCs first came out in the early 1980s. But MS-Windows console screens have much smaller fonts and more rows.

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

i have this one moslem friend. her cousin is a reasonably good small business person. but the easiest way for you to get a job from him is to be family. that means brother or cousin or something like that. otherwise you still have a decent chance if you happened to be married into the family.

Most, if not all, businesses are like that -- not just those owned by moslems.

you see it is not that the majority wants to be silent. it is that the majority see them as brothers. this does not mean that the majority agrees. it does not nescesarily mean that the majority disagrees either. what it means is that they tend(in my somewhat limited experience with them) to believe in standing together and not publically speak out against each other

This reasoning could be applied to most other groups as well, such as blacks, whites, christians, you-name-it.

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

compile it on MS-Windows with a compiler that supports MS-Windows or use a cross compiler on *nix that generates MS-Windows file format executables. Just simply renaming the file is not sufficient.

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

>>Now some threads are labelled "Multi Page Thread",
I don't see that. Maybe its the way you have it set up in Control Panel ? I have Thread Display Mode set up as "Linear - Oldest First"

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

undefined symbol indicates the compiler does not know what that smbol is -- it has not been declared in any of the header files or before it was used. I suspect your program may be missing a header file or a macro of some kind. Search the header file where you THINK it is supposed to be defined to see that it really is there. If its there then check if there is a conditional macro, might be something like this:

#ifdef _WIN32
// define the symbol here
#endif
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

vector does all the dynmaic allocation for you -- just call its push_back() method to add a new row.

string line;
vector<string> array;
...
// now put this inside the file read loop just after getline()
array.push_back(line);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

by tooltips do you mean the thread preview that follows the cursor around on the menu page ? Yes I don't like that either and find it not at all useful when there is more than 1 post in the thread. Its just annoying.

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

search www.codeproject.com -- they have a couple dozen example mfc programs.

You should put your initialization code in the OnInitDialog() function, which gets called by DoModal(). And you may have to subclass the CEdit control.

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

instead of the dot operator use pointer operator

myClient->call(serverUrl, methodName, "ii", &result, 5, 7);

But make sure the pointer is a valid pointer -- it has to be initialized to something before the above line can be successfully executed.

myClient = new xmlrpc_c::clientSimple;
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Miracle Whip (not mayo) is great on jello and sandwitches. Never tried it on eggs, but I think I will. I'll try almost anything at least once.

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

>>destNo = sourceNo<<n; // Here n is the number of bits you want to skip.

Here, the value of n is undefined because you didn't initialize it to anything in the previous line :)

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

Here isspace is a character or a predefined constant in some header??

isspace() is a macro defined in ctype.h header file. It is also be implemented as a standard C function which is why it can be passed to another function as a function pointer. Its a platform-independent way of checking if a character is whitespace.

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

Or this to avoid break. Yes I like your suggestion. You don't need the function pointer variable.

void remove_ws( vector<string>& vertex )
{
  for( size_t i=0 ; i<vertex.size() ; ++i )
  {
      std::string& mystring = vertex[i] ;
      string::iterator where = mystring.begin() ;
      while( (where = find_if( where, mystring.end(), issspace )) != mystring.end() )
      {
        where = mystring.erase(where) ;
      }
  }
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Now i have to again add this to the original vector how should i do that

Please re-read my previous post becasue I tested and changed it. That algorithm works.

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

Slightliy more complicated. You need to use a reference to the string in the vector. The algorithm below removes white space found anywhere in the string.

for(vector<string>::iterator it=vertex.begin();it!=vertex.end();it++)
{
    std::string& mystring = *it;
    std::size_t pos;
    while( (pos = mystring.find_first_of(" \t\r\n")) != string::npos)
    {
        if(pos > 1)
        {
            mystring = mystring.substr(0,pos) + mystring.substr(pos+1);   
        }
        else
        {
            mystring = mystring.substr(pos+1);   
        }
    }

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

post code and an actual example string. For example: "a b c" replaced by "abc". If that's what you want to do when code a while loop something like this:

string::size_t pos;
while( (pos = mystring.find(' ')) != string::npos)
{
    mystring = mystring.substr(0,pos) + mystring.substr(pos+1);   
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

jwenting: your explaination is one reason I am against governments controlling health care. I don't care the USA is ranked so low, when I do care about is government not dictating and controlling patient treatment, which should be left to the doctors. USA also has HMO health insurance, which is a lot like what you described, and no one likes it.

infarction: >> so they charge more to those who can.
Yes I found that out too a couple years ago. Went to er for heart condition and was charged $800.00 just to walk in the front doors! Meanwhile there were some people there who were charged zero. Fortunately my health insurance company paid 100% of that bill.

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

And those people during Mardi Gras don't do it in order to show how "normal" they are, which is the stated purpose of "Gay Pride" parades...

Agreed. The people in Gry Pride parades look and act like freaks.

And normal men don't usually claim that their actions are legal because of their sexual orientation.

I doubt most gay men would either, although I can't say for sure because I don't know most of them :) I have never heard that argument before.

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

Here is a short ifstream tutorial. Its a little old, so replace fstream.h with fstream because current c++ standards have dropped the .h file extension.

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

One explaination of threads is here.. Exactly how to apply it to your program depends on what you want the threads to do.

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

in your example read the whole line then extract just the first word and compare it. To extract the first word look for space and use substring method.

std::string line = "semantic relating to the meaning of words";
std::string::size_type spot = line.find(' '); // look for a space
std::string word = line.substr(0, spot);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>If this value greater than zero their should have exception handling
I don't think there is a way to listen for errors like that. The program would have to be coded on function-per-function basis. Each time a function is called check its return value for error condition. And C language does not support C++ style exception handling. In C language the best you can do is use a series of setjmp() and longjmp() or check function return values.

Deleting a specific entry in a DB table is not much of a problem if you know SQL and use ODBC or the database's specific language. ODBC is pretty portable to all databases. You have to know user name, password, table name, table structure, and key field value of the row you want to delete. Of course the user name you supply must have permission to do the deletions (not everyone is allowed to do that).

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

Another reason the U.S. didn't score high in the WHO rankings is that we are less socialistic than other nations. What has that got to do with the quality of health care? For the authors of the study, it's crucial. The WHO judged countries not on the absolute quality of health care, but on how "fairly" health care of any quality is "distributed." The problem here is obvious. By that criterion, a country with high-quality care overall but "unequal distribution" would rank below a country with lower quality care but equal distribution.

Lack of universal health care I suspect is the main reason US was ranked so low. And I agree with WHO that it is critical to the quality of health care in this country. Quality does not mean only how well doctors do their jobs or how much medical technology we have, but also includes how easy it is for everyone to have ready access to health care. We could have the best doctors and best hospitals in the world but it means nothing if people can't have access to it.

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

IAnywho, not married myself (duh). Don't want to be. It's nothing more than a piece of paper to me. You love someone they should know it, you shouldn't have to stand up infront of people and sign a document to prove it.

If you really feel that way then you should stay single. No point punishing a woman with your attitude. Marriage and that piece of paper has many many benefits, especially when dealing with government agencies. Did you know that if you shacked up with a woman, had young kids with her, then you died your woman would get absolutely nothing. She would be left with the kids to raise by herself unless she gets another joker to shack up with her. But if you had married her she would get quite a bit of government benefits until the children are 18 years old. Also, my wife and I just recently signed up for old age social security benefits. Since we are legally married my wife will get part of my social security benefits after I die. Had we not been married she would have received nothing.

christina>you commented: completely true. +15
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm not . If I (or any non-homosexual) were to behave like homos behave during those "parades" (which are supposedly meant to show how normal they are, how well adjusted to civilised society) I'd be arrested instantly and put behind bars.

You are probably right :) But the Mardi Gras parades otherwise hetrosexual people do exactly that.

Not at all lies. Only last month a homosexual man was arrested in the US Northeast (Vermont I think) for pedophilia and sexual assault of a large number of boys.
He claimed he was allowed to do it because he's homosexual, that because of that it's not child abuse...
And he's hardly alone. There are several cases just like that even in this small country every year.
Usually they indeed seem to think they do the kids a favour, the sickos.

Do you always judge a group of people by the actions of one or two? In the specific case you sited the man should be tried as a pedophile, and do the same for others as the cases arise. But that in no way means all gay men are pedophiles.

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

please write the programming code of this reverse contents of array in c++

Sorry, I will not do your homework. Take a stab at it, post your code and ask specific questions. Then and only then will people here help you.

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

>>What's the syntax for the string's find method
It only has one parameter -- the string you want to look for. It returns either string::npos when the string is not found or the index where it starts.

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

Just because some programmers use goto in kernel programs doesn't mean its acceptable to use it in application programs. I've never written a *nix kernel program or even seen one.

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

You probably can't get access to the ports that have keyboards attached because they are probably already in use by the os. I don't know how the os works with two keyboards attached. You can try using keyboard hooks but again two keyboards is problematic. Once you can get the characters typed on the keyboards its a simple matter to xmit them back out a different port.

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

Switzerland(lived there as a child)

Ohhh Yes :) Do you know Heidi ? the 1937 film staring Shirly Temple ? Is Switzerland anything like that (probably not) ?

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

When not being a geek, I will:

play football with my son
play games with my daughter
go for walks in the countryside with my wife
get tattooed
listen to music
read
drive
add to my collection of vintage video games

Darn, I may have lapsed back into geekdom with that last one!

And don't forget all those great vacations you have been taking, such as going (driving?) to scotland.

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

searching a file for a specific string is fairly straight forward. Open the file, read each line and search the lines for desired string. use std::ifstream object for the file, getline() to read each line into a std::string object, the use the string's find() method to see if it contains the desired string.

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

unfortunately there is really nothing you can do about it except to use a 64-bit integer, such as long long or _int64. What you are experiencing is data overflow -- integers can only hold a finite number of digits. The file limits.h contains macros that are the maximum values for various data types.

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

@OP
If you're into deep problems, perhaps a career in oceanography would be to your liking ;)

or one in deep space abord the Startrek Voyager :)

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

I'm retired now and on Social Security. Yea -- you young working or soon-to-be-working Americans can support me now for the rest of my life just as I supported my elders over the past 45 years. But I keep myself busy working part time at Wal-Mart (all old retires work there), doing mystery shopping at various businesses in my area, and helping out here at DaniWeb. Also became very interesting in Dungeon Runner online game.

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

Or here

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

search the array backwards -- go to the end of the array and search to the beginning by decrementing the loop counter.

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

you need to be a little more specific -- monitor error code occurrences about what? delete instances of what in what DB? Your description is way too brief to be of much value.

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

Lets see if I have this straight: get input from keyboard on computer #1 and send it via serial port to the keyboard buffer on computer #2. Yes that is certainly possible and will require you to write two different programs -- one for each computer.