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

function create_queue() is attempting to dereference a NULL pointer. You don't need to call that function on line 23 because the pointer is already NULL.

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

for(int i=0, j = 0; i<208 && i<200; i+=2, ++j)

What's up with the i<208 && i<200? You only need one of those, not both. i<200 will prevent the loop from executing more than 200 times, so i<208 is useless code.

dest[i][0] = 0.0;

Careful with that because when i and j are the same value it will null out the string that it just finished concantinating. It would be a lot safer to do that in another loop

while( j < MAX_S_ROWS )
{
    destination[j++][0] = 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Your loop to display the output is wrong. After concantination there are no longer 108 strings. One way to solve that is after concantination zero out the first byte of all the remaining strings, then when displaying them don't use 108 but check for destination[i][0] == '\0'

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

The main problem is that dest isn't big enough, some strings are longer than 13 characters. Increase the size of dest

char destination[208][25];

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

Do you like it? I've seen it in a showroom and couldn't tell the difference between 3d and normal tv. I've read elsewhere that it makes may people dizzy, headaches and other problems. The same with 3d blu-ray movies, I won't buy them. What's your thoughts?

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

These my not work if dest is the same things as src1 (such as when i and j are both the same value in the loop). If that is the cast then you would only want to concantinate src2 to dest and ignore src1.

void myStrCat(char dest[], char src1[], char src2[] )
{
    if( dest != src1 ) // compare the pointers, not the strings
       strcpy(dest,src1);
    strcat(dest,src2);
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

They both do the same thing -- its just how the object is declared. The -> is pointer notation. Some examples:

class MyClass
{
public:
   int x;
 };

 // in this function pMyClass is a pointer, so it requires -> to 
 // reference any of it's objects
 void foo(MyClass* pMyClass)
 {
     pMyClass->x = 0;
 }   

 // in this function pMyClass is a reference which uses the . notation
 void foo(MyClass& pMyClass)
 {
     pMyClass.x = 0;
 }


 int main()
 {
    MyClass mc;
    mc.x = 0; // Neither a pointer nor a reference

    MyClass* pmc = &mc;
    pmc->x = 0; // This is a pointer and requires -> notation

    MyClass& rmd = mc;
    rmc.x = 0; // This is a reference so it requires . notation
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

yes, you didn't post it so I can't tell you how to change it.

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

The problem is in concantination function. The loop doesn't work right. After the first iteration the strings are

borndramatic dramatic insurance gravy release frying

Notice that dramatic is now in the list twice. When the first loop is finished the value of i is incremented from 0 to 2, which points to insurance. Now after the second loop iteration the strings are

borndramatic dramatic insurancegravy gravy release frying

This behavior is why after the shuffle some of the original strings are still there. I think what you need is another counter that tells where in the array the new strings should appear. In the code below myStrCat() had three parameters, not one. The first parameter is the destination, and the other two are the two strings to be concantinated. After the loop is finished you will have to null out all remaining strings in the array.

 for(int i=0, j = 0; i<208; i+=2, ++j)  // i < 208 concatenates all 208. 

     {
       myStrCat(dest[j], dest[i],dest[i+1]); // myStrCat is equal to strcat().
       // cout << dest[i] << " "; // outputs the first 100.
     }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What Window 7 can do Window XP cannot do?

More memory, larger hard drives, larger files on the hard drive, faster processing, work well with multi-core processors. Windows 8 isn't really all that much of a learning curve -- just have to figure out where things have been moved to. For older people I can see many of them having some difficulty adjusting to Windows 8, but young people can probably learn it in an hour or two. If you can figure out how to text on a cellphone learning Windows 8 should be a breeze.

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

As I said, boost is cross platform. Just use google and you will find lots of tutorials and help.

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

See line 165 of mongoose.c -- you need to define the macro HAVE_STDINT near the top of that *.c file.

#define HAVE_STDINT

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

Sometimes I have voted Republican, sometimes Democrat, and a couple times Other. It all depends on who is running for that job and whether I agree with their campaign speeches, which are often just so much malarkey.

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

I couldn't get it to install either on Windows 7

f766f495df4c8446f4dfa34820d4e498

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

All that code does is illustrate how to copy data into register ax from somewhere. For example: mov ax,bx just copies the value of bx into ax register. In another case, mov ax,[bx+di] it assumes the data is in the segment pointed to by the ds register. It could also have been written like this: mov ax,ds:[bx+di]

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

Read this free book which has a chapter on sending email

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

Agree -- Obama is treading on very thin ice. If he invades Syria he might be the one who gets outsted. That's why he would need the full support of Congress, and I doubt he will get it. American's are sick of constant wars over the past 10-15 years. We don't need to get involved in another no-win situation.

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

You don't really need to write your own HTTP server, such as Apache2, to do all that. Just write client/server socket programs, then carefully design the commands you want the server to recognize and how to do file transfers.

What operating system do you plan to use? boost has os independent socket libraries. At my last job four of us wrote a similar program in about a year -- coding, debugging and testing.

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

That is very sad, that most UK office personal does that.

I'd bet the data is over stated. What they could count is only those who stay on the porn sites for more than 10 seconds or so. Anything less could just be accidental.

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

AFAIK wordpress is not a database -- it requires MySQL

As for backups -- the hosting company I used had an option to backup the MySQL database onto my local computer's hard drive. From there you can do whatever you want with it. I do not recommend backing up to cloud because of lack of security.

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

Most websites use MySQL databases, and most hosting companies have it included in the package you buy.

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

Libitarian is a political party that has been around in the USA for many many years.

The only difference between Conservatives and Libertarians is that most Libertarians advocate the legalization of drugs.

http://answers.yahoo.com/question/index?qid=20080203090809AA1hWDT

LastMitch commented: Thanks for the link! +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Just because you are big doesn't give you the right to push and bend other countries to your wil

Actually, it does. If it weren't for the USA and its allies the world would be in complete communist control today, or even worse under islomic control. The very worst kinds of governments are those based on some religion -- any religion will do. The USA in the 1700/1800s wasn't exactly kind to everyone, I'm thinking of the Christian witch hunts and destruction of native Americans.

There are three kinds of bullies in the world today. The good bullies are USA and its allies. Then there are the bad bullies, like China and Russia. Then the worst kind of bullies, Iran, Syria, etc which are all religious-based governments. And I won't forget all the African dictators either who also have killed thousands of their own people but we don't hear a lot about them today.

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

you will have to get the specs from the manufacturer how to get that info.

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

That's the widget to share the article on LinkedIn,

Ok, I just never heard of it.

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

fgets() is declared in stdio.h not stdlib.h. Your program doesn't need wincon.h because it isn't using anything from that file.

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

I only see that in this thread, I don't see that in other threads.

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

Can you change it to something that isn't your name and then back to your name?

I don't think so -- as I recall we only get one crack at changing the user name.

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

OMG! I did not notice we now have spellcheck :) :) When did you sneek that in on us???

Now if we could only get smilies

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

I also notice a difference in the wording at the top when Files is clicked

If I'm editing an existing post:

Files will automatically be attached to the post upon upload. Optionally, you can embed uploaded images within your post.

If it's a new post

Files will automatically be attached to the post upon upload. Optionally, you can embed uploaded images within your post. Maximum file size is 1MB and maximum dimensions for images are 1600x1200

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

If it's the thread I started upload works ok as long as I attempt to upload the file at the same time that I create the thread. Any other time I don't get any error message such as "file too big" (it's only 124K) or the options where to place in the post. It just does nothing at all.

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

Looks ok for me -- except the Related Articles are funky due to something called "in" that appears in a blue retangle and the word "share" in white rectangle. They cover up the letters in Related Articles and the articles. I tried using the scroll wheel on the mouse to change font size that that does not fix the problem.

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

Can you get to other web sites on your computer? A few suggestions:

  1. make sure your computer is always running antivirus program and a firewall.

  2. clear your browser's catch and temp files. You should do this on a regular basis.

  3. If that doesn't fix it delete all cookies and try to log in again

  4. Download a program that checks for malware -- antivirus programs don't do that.

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

The drive is USB 2

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

A function cannot return an object from its stack

In c++, yes it can.

class foo
{

};

foo somefunction()
{
    foo f;
    return f;
}

And on Windows, this is virtually the only option

Yes -- in a DLL. Memory allocated in a DLL is not in the same heap as memory allocated in the application program, therefore all memory allocated in the DLL must be destroyed in the same DLL.

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

The best way to learn a programming language is lots and lots of practice. One learns to play a piano well only by years of practice -- same with progamming languages. At first you will have to constantly read reference books, but the more you program the more you remember and the less you will have to read about it. You will NEVER get to the point where you thik "I know everything there is to know about XXX language" because someone always knows ways to use it that you may not have thought possible or thought about. So unless your are genius (Ph.D. level) then give yourself a couple years full-time study to get to know the language well.

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

Here is an example

char* foo()
{
   char* ptr = new char[255]72222222;
   return ptr;
}

int main()
{
    char* p = foo();
    delete[] p; 
}


// THIS IS WRONG EXAMPLE
char* foo()
{
    char array[255];

    return array; // WRONG!
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Depends. When a function returns a c++ class it will return a copy of the object, not the object iteself, so it doesn't matter if the original object is on the heap or the stack. If the function returns a POD array, such as char array then it must be declared in the heap because the array is not copied. When such an array is declared on the stack then the array is destroyed as soon as the function returns, making the array invalid. That is the cause of many difficult to find bugs.

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

It is perfectly legle in USA IF I do not attempt to transfer the copies anywhere else, such as to another computer or over the internet. I've already looked up the laws on that one. I have the right to make one copy for myself.

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

So, we sell our old missiles to allies so that THEY, not us, can experience the 50% failure rate! Very nice of us, no?

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

I have an external usb dvd drive and an internal blu-ray drive. I use both at the same time for ripping movies to My Book 3TB external hard drive. I've noticed that the external dvd drive is considerably slower than the blu-ray drive. Any idea if the cause is because the dvd drive is usb connection instead of internal drive? If I replaced it with an internal dvd drive do you think it would be faster? I don't know the R/W rates of the two drives.

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

No -- but an interesting question. I would think it would require a total rewrite of the program, unless there exists some program that will attempt to make that conversion. IMO the most difficult problem would be report writers -- COBOL has an excellent report writer that would be difficult to duplicate in other languages. Database, screens and other logic is probably not difficult to duplicate in another language.

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

char urname[1],surname[1],fullname[1];

How many people do you know who have a first, middle and last name that consists of only 1 character??? gets() doesn't allocate new memory, you have to do that yourself. You sort of have to guess about how big to make those variables then use fgets(), not gets(), to limit user input like this:

fgets(urname, sizeof(urname), stdin);

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
<M/> commented: lol +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Are you asking what to use to produce such apps? I've never done one but I think you can use java, C, C++, and several other languages to write mobile apps.

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

I doubt Ma Bell (as us telephone companies are called) care as long as they get their money.

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

Years ago (1990s) I took over a large MS-DOS program from another programmer which had about 40 *.c files. Each of the files declared global variables that were used in many of the other files. IMO it was a horrible mess -- took me weeks to figure it all out. Eventually I consolidated all those globals into a single *.c file named Globals.c. By doing that I discovered several variables declared in more than one *.c file, which was causing problems.

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

probably str is not declared correctly, or is too short. This works

#include <Windows.h>
#include <string.h>
#pragma warning(disable: 4996)

int main()
{
HANDLE clip;
char str[255] = {0};
    if (OpenClipboard(NULL)) {
        clip = GetClipboardData(CF_TEXT);
        CloseClipboard();
        strncpy(str, (char*)clip, sizeof(str)-1);
        printf("%s\n", str);
    }

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

So then I beleive it is okay without a pause in the loop

Not really -- without a Thread.Sleep() other processes don't have much of a chance to get CPU time. You can easily test this by putting Thread.Sleep(0) inside the loop then check Task Manager to see what affect it has on the CPU time your program consumes.

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

How much does it really matter whether it is from gas, a bullet or a bomb, especially if you are an innocent civilian

I think how one dies does matter -- dying from gas can be pretty painful, dying from a bullet is almost instantanous. And what does it matter whether the dead were innocent civilians or militants? Dead is dead afterall.