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

I see that the list changes each time you click on your profile and whenever you refresh the browser when it's already in your profile. Wouldn't it be easier to just give us a complete list and let us check the members we want to entorse? Or is the complete list all 1,000,000 DaniWeb members?

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

It's not just WalMart, BestBuy and Target were similar to that too.

Not all americans are berserk like that..

Yes we are :) :)

No walmart shopper has an IQ over 30 unfortunately.

There are some very smart people who shop in WalMart, just not very many of them. Check out some of these photos if you don't believe me :)
Click Here

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

It might, assuming you don't plan to port the program to another operating system and use a compiler that supports functions in conio.h. conio.h and its associated library are non-standard, which means not all compilers will support it. Too bad because conio.h contains several really useful functions, such as kbhit(). But you can replicate that by using win32 api console functions.

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

I don't know what compiler you are using, but this works (your second attempt) with vc++ 2012 Express. Maybe the problem is caused by something else in your program.

#include <iostream>
#include <fstream>
int main()
{
    long length;
    std::ifstream is("l.2");
    is.seekg (0, std::ios::end);
  length = is.tellg();
  std::cout << length << '\n';
  is.close();   

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

live 5 more years
lose some weight
see my great-grandchildren (none yet)
go bungee jumping
go skydiving
win the tax-free lottery

<M/> commented: you probably get more than 5 years :) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

For all our non-American friends here at DaniWeb this is a video that shows you what Black Friday means in America.

http://techcrunch.com/2012/11/23/a-glimpse-of-the-apocalypse-walmart-customers-fight-over-phones-on-black-friday/

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

testing bump

I am concerned that this will lead to people posting "bump" and other such empty content just to get their names in the bar.

Nope. It apparently doesn't work like that. once the thead is marked solved the bar doesn't change when new posters add to the thread. I just tried it.

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

windows 8 is still almost unusable for me. I took my computer to Best Buy to get Windows 8 reinstalled. Everything except one has been ok since then -- now when I right click on anything Windows Explorer crashes. I've looked in the logs and see error messages that Explorer stopped working. I know that programs can alter the menu that appears when you right-click and I suspect that is what's causing Explorer to crash.

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

macs are overpriced too -- two to three times more expensive than PCs.

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

And did it make you think windows is better mac os x operating systems?

Anything is better than mac os x :) I have a friend that has it on a notebook, always crashing and corrupting files.

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

Compile for debugging then learn to use your compiler's debugger to single step through the program. When you learn to do your own debugging you will be better able to find such problems yourself.

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

@artemisfowl12: you need to start your own thread. To answer your question, create another thread and play the song from there. If you are running MS-Windows you could call CreateProcess() instead of system(), but CreateProcess() is a little more complicated to call. Fortunately, most of the parameters can be 0 or NULL.

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

Yes I think OnInitDialog() is a good place to create the thread.

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

Well, spend about 10 years learning how to do it then.

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

What kind of graph do you want? Line, pie, bar, or something else? Whatever it is, I suspect you will have to modify that charing program you found on codeproject.com to fit your needs. It expects to receive a bunch of data all at once and chart it. What you are trying to do is dribble a little bit into it evey second, something like a machine that continuously produces a real-time sign wave.

That control was written with VC6.0, there have been a lot of changes to MFC between that version and the compiler you currently use. Consequently it's going to require you to make some changes to the control's code. I assume you have VC++ 2010 Professional or better.

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

Since we know nothing about your program, that function, or the data it is impossible for anyone to help you with this. You'll have to be a lot more specific and probably post some code. Out of all the data that you get from the socket you have to figure out what it is that you want your dialog program to plot, then save the data into some sort of circular buffer so that the dialog program can read it. As for where to put that function, I'd put it in another thread so that it can do it's thing without blocking the dialog program, and vice versa.

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

It will depend on what you mean by external source. An SQL database, a file, over the internet??

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

vector<string> db(string input)

That function doesn't return anything.

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

vector::reserve does NOT initialize the vector with the structures, reserve() only allocates memory for them. Your program still must call vector::push_back() or vector::insert()

The second problem with your function is that the first element of all arrays (vector is an array) is 0, not 1. And the max element index is 10000-1 So the loop needs to be modified as shown in my code below. I did not check the rest of your program for this problem, I figured you can do that yourself.

Finally, you should be into the habit of declaring const int to refer to constant values that are used throughout the program. 10000 is a good candidate for that because if you want to change it to some other value you will have to change it in quite a few places. Declaring const int at the beginning of the program makes all that a lot simpler and error free.

cont int maxSize = 10000;
void createuniverse()
{
    systems.reserve(maxSize);
    for (int index = 0; index < maxSize; index++)
    {
        starsystem sys;
        systems.push_back(sys);
        systems[index].planetcount = getrandomint(1, 20);;
        systems[index].diameter = (getrandomint(1, 30) * systems[index].planetcount);
        systems[index].sun.age = getrandomint(1, 20);
        systems[index].sun.coretemp = getrandomint(1, 30);
        systems[index].sun.diameter = getrandomint(1, 2000);

    }


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

your test() is doing too much work! The solution is much simpler.

void test()
{
    double x;
    double y;
    double z;

#if 0
    cout << "Enter price 1:";
    cin >> x;
    cout << "Enter price 2:";
    cin >> y;
    cout << "Enter price 3:";
    cin >> z;
#endif
    x = 5.0;
    y = 50.0;
    z = 500.0;
    cout << fixed << setprecision(2);
    cout  << "$" << setw(20) << right << x << endl;
    cout  << "$" << setw(20) << right << y << endl;
    cout  << "$" << setw(20) << right << z << endl;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

By gap buffer do you mean a character array that holds the characters that are typed from the keyboard? All you need is an integer whose value is the position in the character array where the next character is to be stored. Where the gap starts? At the beginning.

char buffer[255];
int nextChar = 0;

cout << "Enter a character\n";
cin >> buffer[nextChar];
++nextChar; // point to the next available char in the buffer
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Create another thread. See this article

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

Why would anyone want to visit Munbai or New Delhi, which are on the list of the 10 most polluted cities in the world.

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

from apple; operating system

That explains everything :)

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

I posted on DaniWeb. Why do you think I have such a high post count :)

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

You really need to start reading a book, because a book will explain all the questions your are asking. See amazon.com for a list of good c/c++ intro books.

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

Unless you have a compiler that recognizes the most recent version of c++ standards that line 8 won't compile. I think recent version of gcc is ok. There are no versions of Microsoft compilers that will compile it.

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

Grand Canyon in Arizona USA

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

USA
--baseball
--football
--basketball
--ice hockey

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

I wouldn't be surprised to see it on CBS, NBC, FOX, or ABC. All they have to do is butcher it up like they do other movies.

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

That may be a nice guester, but I wouldn't do it for the simple fact that (1) theft, and (2) one or more employees could use it for unscrupulous purposes. Why don't they just ask me to leave all my credit cards at the desk?

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

// I tied this too didnt work

I think the problem is that MFC doesn't have a chance to process the message(s) until after that function returns. You need to add your own message pump after that line (see this article for full explanation).

MSG msg;
 while (GetMessage(&msg, NULL, 0, 0)) {
    TranslateMessage(&msg);
    DispatchMessage(&msg);  // send to window proc
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Why don't you just write it yourself instead of begging us to do your homework for you. I charge $1,000.00 USD to do your homework.

Shft commented: Isn't the golden rule "Treat others as thou are liked to be treated"? +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Not advisable. There are other tools that are a lot better for that. A good friend of mine is right now in school learning animation and doesn't know a thing about computer programming. It's all about drawing each frame then using another program (I don't know what it is) that takes those frames to make the animation. No coding needed.

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

Same problem as the previous one.

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

shouldn't it be named threeD instead of twoD??

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

You mean Five Fingers that stars Laurence Fishburne. That movie is bit violent to show on TV it has to be on than Cable.

I watch cable on my TV, don't you?

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

on line 40 the parameters to removename() are reversed, you have them backwards.

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

Just finished watching Five Fingers on TV, a very good thriller, not suitable for small children.

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

line 18 and 19 are wrong. int circle() is a function prototype, not a function call.

if(choice = 'c') { circ() ; }

line 20: never, ever call main(). Even though it's a function it is reserved for call by the operating system when the program starts. Instead, you should put lines 16-19 in a loop.

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

closing parenthese are wrong and it has a semicolon at the end of the line

if(strcmp(A[i][j],B[i][j])==0)

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

Check out some of these articles. Most are for C# but they should apply to CLR/C++ as well. You should bookmark that site because they have the largest repository of free code/examples on the net for MS-Windows programming.

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

Are you trying to create a 2d array of integers where each dimension is the same size? Here's how to do it. (It's spelled int, not Integer)

Think of a 2d array much like a chessboard which has rows and columns. The rows are the first dimension and the columns are the second dimension. Before you can allocate the columns you have to allocate the rows.

const int size = 4;

int** twod = new int[size]; // rows
for(int i = 0; i < size; i++)
   twod[i] = new int[size]; // columns

Now, then you destroy that you do it in reverse order, that is delete[] the columns first and then the rows.

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

I went to WalMart a couple years ago on black Friday, went about midnight. It was lots of fun, the most people I've ever seen at WalMart the same time. It took about an hour to get through the checkout register. I might do it again this year just to see all those people :) This year some merchants such as Target are starting Black Friday about 10:00 pm Thursday night, their employees are not very happy about that. I heard on the news a couple nights ago WalMart employees are threatening a walkout in several cities ardound USA.

Do European's have anything similar?

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

Team College is someone who is no longer a mod or admin. I was a mod for several years, then decided to quit.

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

Do you see the Mod or Admin badge beneath my avatar???

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

I think the yellow folders are the ones you have never posted in.

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

Right, I was looking at Activity Points, not position in the list. At any rate, you are a long ways above me. Happygeek may be #1 because of all the time he spends on doing his mod stuff.

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

Are you looking in the right column? I'm #36 in the list today and you are #2.

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

eating fat-free and surgar-free cholote pudding :) I just ate a bowl of it :) :)