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

There is no limit.

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

You can't unless you also write your own file system, which I doubt you will want to do. The CD command is only good while the program is still running. After the program terminated the current directory reverts back to whatever it was before the program started. AFAIK there is no way to change that behavior.

The program you posted in another thread about this problem should work as far as I can tell. I never had a problem with chdir() unless I was giving it an invalid path.

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

Do you mean the function on line 154? What constitutes end-of-line? Does the machine sending the weights append '\n' or something to indicate end-of-line? You don't have any control over that, so if you want all the weights on one line then save them into your own string when received. Then on line 161 instead of appending each individual weight first get the text already in the textbox, append the new weight, erase the textbox, then finally put the new text back into the textbox.

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

what's wrong with skype or something like that?

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

What coding? Just copy the files to another hard drive.

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

what should I use if I'm going to scan for integers

The same as for single characters, no different.

Is there something wrong about the scanning of my input?

No, that's just the way scanf() works.

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

It's still just fopen() regardless of where the file is located, for example

FILE* fp = fopen("c:\\documents\\test.txt","r");

In your program you will need to get the string as a character array because it comes from keyboard

char inbuf[255];
fgets(inbuf,sizeof(inbuf),stdin); // get string from keyboard
// now clear trailing '\n'
if(inbuf[strlen(inbuf)-1] == '\n')
    inbuf[strlen(inbuf)-1] = '\0';
FILE* fp = fopen(inbuf,"r");    
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

reverse lines 4 and 5, then lines 15 and 16. The purpose of lines 4 and 15 is to remove the '\n' from the keyboard buffer after calling scanf(). You need to do the same after line 33.

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

If he doesn't have access to the server how is he supposed to calculate consumption? That's like me wanting to make similar approximation of the DaniWeb servers -- no way for me to do it.

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

Because c++ standards stay that's the way it has to be done. Just declaring an object static in the class declaration isn't enough -- the static objects also have to be declared just like ordinary global data; that's actually what they are.

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

You have static data in some of the classes that also need to be declared globally in one of the *cpp files. Static class data is just like normal global data except they contain the class scope operator.

For example you might declare them in main.cpp like this example

#include <iostream>
#include <cstdlib>
#include <cctype>
#include <string>
#include "Balls.h"
using namespace std;

int Basket::count = 0; // <<<<<<<<<<<<<<<<<<<<<

int main(int argc, char* argv[]){
    if(argc!=6){
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

how software is converted into electrical pulses or 0's and 1's in computer. How does the computer do it?

The computer itself doesn't do it, it's converted from human readable text into computer usable instructions with a compiler or interpreter.

As for your other questions, someone else will have to answer because I don't know. Exactly how all that is done is most likely company secrets and patents by Intel and other companies like that.

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

I'm hearing alot of crap about Linux being command-line based with no REAL GUI support..

That may have been the case 30 years ago, but times have changed a bit. Ubuntu has a good GUI interface as do other distributions. The main reason I don't run *nix is because many of the games I like are not ported to *nix.

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

what do you mean cd doesn't work ? Explain more about the behavior that you think is wrong.

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

It's all right here -- Bush would still have won had there been a recount. But this is 15 year-old news and not worth repeating.

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

You can't make it into a switch statement. switch only works on integers, never stings.

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

While the other networks waited for official results, Fox News just went ahead and called it for Bush.

How can you claim Fox elected Bush when what they did doesn't affect voting ?? You sound like you are still just pissed off because Bush was elected. Bad looser. Get over it. You need to pay more attention to Canadian politics instead of American politics where you have no say one way or the other. Of course US could always make Canada it's 51st state, then you could vote in American elections.

But we digress, lets get back on topic.

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

cannot recognize the method group(String)

Does matcher have such a method?

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

in which George Bush was elected by Fox News

That never happened.

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

what is the error?

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

According to Law and Order (the gospel on legal matters) in USA anything left on the street is considered public property and can be taken by anyone who wants it. I've actually done that myself -- that is, I've left stuff on the street curb in front of my house hoping someone would take it, and sure enough, someone did within 24 hours. Also, a neighbor abandoned his house with stuff in it, the police came and tossed it all on the street for people to take if they wanted it. After four days the police had the trash collectors pick up all remaining stuff.

I draw the line, though, at rummaging through people's transh cans -- never know what you might find.

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

Change the return type of each function to return the value of c and y, then in the third function you can get those values to compare them. Something like this:

int foo1()
{
   int c = 5;
   return c;
}

int foo2()
{
   int y = 0;
   return y;
}

int foo3()
{
   int c = foo1();
   int y = foo2();
   return c == y;  // returns either 1 or 0 (true or false)
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Per head of population it must have been murder capital of the US!

I've always thought that amusing too :) Then she went off to teach college -- AFAIK she has no formal education other than probably high school. She was just an old widow who decided to write a book one day. Is that all the qualifications it takes to teach college nowdays???

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

It's pretty warm here today. I think sprint has finally sprung because all the birds are chirping loudly.

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

Study and work full time with c++ for about 10 years and you will become a master at it.

Schol-R-LEA commented: That's what it would take, for sure. +10
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You didn't do it like I showed you. line 13 is wrong. Re-read all the code I posted.

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

Wasn't it in Iraq when Saddam Hussein held free elections he got 100% of all the votes :)

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

There are a few errors in the code you posted, such as lines 17 and 23. Line 24 is inside the if statement that begins on line 23.

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

Or just do it like this:

void zeroMatrix(float arr[][2]);
void main()
{

    float e[2][2];

    zeroMatrix(e);


}
void zeroMatrix(float arr[][2])
{
    int i, j;
    for (i = 0; i<2; i++)
    {
        for (j = 0; j<2; j++)
        {
            *(*(arr + i) + j) = 0;
        }
    }
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Some compilers complain if the include files you create are in quote or angle bracks

#include "client.h"

Use quotes if client.h is in the same folder as your *.c file(s)

#include <client.h>

Use angle brackets if client.h is in the compiler's include folder.

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

i hope it usefull for you

It's not -- have no idea what you're talking about.

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

Republicans aren't the only party guilty of that. Democrates are guilty as well, here in St Louis area a few years ago there were many dead people who voted Democrat. Seems that only happens when Republicans are winning.

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

Here I am using the function atoi() to convert a string to an integer. First extract the substring of the digits I need for the integer then pass a pointer to the character array to atoi().

string date;
int month, day, year;

cout << "Enter a data in format mm/dd/yyyy\n";
cin >> date;
// no error checking here, assumes you entered date in correct format
// But ... your program probably needs to verify the format of the string.

month = atoi(date.substr(0,3).c_str());
day = atoi(date.substr(3,3).c_str());
year = atoi(date.substr(6).c_str());
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 14 won't work because you have to also enter the / between the numbers. Get the input as a string then parse the string to extract each of the individual parts.

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

And how about those few paople who don't have computers?

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

This is the start of the function, now all you have to do is create two nested loops. The outermost loop iterated from 0 to 6 which displays the compainies, and the inner loop counts from 0 to 4, displaying each of the sales on the same line as the company name. Each of the columns should be separated with a space, tab, comma, or some other separator of your choice.

ofstream& writeData(ofstream& out, char companies[6],char sales[6][4])
{

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

Download anything on the internet and you will have uninvited guests.

Depends on where you browse and download from. If you download illegal stuff then yes, you will most likely get viruses and malware.

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

Do you already subscribe to a website hosting service?

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

I think electronic voting has been proven to be even less reliable then paper voting either because of bugs in the electronic software or hackers. It wouldn't be difficult for a programmer to write the software which auto votes for a particular candidate regardless of who the voter intended. That is much more difficult to do with paper voting. Neither system is 100% reliable but I think paper voting is the more reliable of the two systems.

It would be nice if we could just vote on our smartphones or computers, but I doubt that will ever happen due to high probability of voter fraud.

[eddit] Here is an abstract of an article written a few years ago on this subject. Admittedly I have not read it all.

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

I use Chrome Version 33.0.1750.146 m on 64-bit Windows 8.1 and don't have that issue. Your screenshot looks like you have two instances of Chrome, one on top of the other. Check Task Manager and see if that's the case.

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

"Coding Academy" -- just another catchy phrase for online tutorial. Do you have one in mind? Post a link to it so we can see what you are talking about. IMY get one of the programming books from Amazon.com or your local book store. They contain much better and more detailed information.

See this ongoing thread for recommended books.

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

gotten -- past tense of get. See Marian Webster dictionary. And in the Oxyford Dictionary. The word dates back to Middle English, which was a few year before my time.

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

typecasting doesn't work. You use the macro toupper() on each character in the string (use a loop)

Example

char c = 'a';
c = toupper(c); // convert to upper-case
printf("%c\n", c);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

On my computer the file is here: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib

If you also have VS 2010 installed on the same computer there may be a conflict. See this related article

I have 2013 Pro edition installed on my computer and don't have that problem.

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

You're missing the open brace { for the start of the do loop (line 25).

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

when I input a binary number it won't give an answer

That's because b2 is an integer, binary numbers are character arrays, not integers. If you want to enter a binary number, such as 010101 you have to get it as a string then convert the string to an integer.

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

Here's another similar thread that may give you some ideas.

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

line 24 is incorrect -- password.length(); length is a function call so you need parentheses.

You might want to move the while loop on lines 21 and 22 up to be between lines 7 and 8 so that everything is inside that loop.