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

VC++ 2008 Express edition does not contain a resource editor. If you want one then you will have to get one of the free ones (or buy one) that you can find on the internet.

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

I finally found the solution. In Thunderbird, select the menu Tools --> Spamato --> Configure Spamato On http:://localhost. Select "Sound" from the menu in the left-hand pane, then change the radio button to "No Sound".

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

fake sound affects -- but funny anyway :)

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

or like this, when done the vector will contain the contents of both int arrays.

int main()
{
    int a1[45];
    int a2[45];
    int x = 0;
    vector<int> v1( (sizeof(a1)/sizeof(a1[0])) + sizeof(a2)/sizeof(a2[0]) );
    for(int i = 0; i < sizeof(a1)/sizeof(a1[0]); i++)
        v1[i] = a1[i];
    for(int i = 0; i < sizeof(a2)/sizeof(a2[0]); i++)
        v1[i] = a2[i];
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

VC++ 2008 -- Express edition is free. Although C# is good too.

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

you can't do windows script in cygwin. why not this

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

>>I need it with out the commas, so that it can be put into an XLS spread sheet.

"AAAUSA-0046" "AAAA" "AAAAA061" 100.00
"AAAUSA-0057" "AAAA CCCC" "AAAAA026" 100.00
Press any key to continue . . .

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

I don't know. But it only took me about 1/2 hour to write a C++ program, 70 line (including blank lines) that produced the output I posted. And it will run a whole lot quicker than doing that with a shell script.

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

what operating system?

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

Windows batch files isn't sophisticated enough to do all that. You will need to write a small program in one of the man programming languages such as C or C++.

Is this the output you want?

AAAUSA-0046,AAAA,AAAAA061,100.00
AAAUSA-0057,AAAA CCCC -,AAAAA026,100.00
Press any key to continue . . .

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

I have not tried them but these look promising.

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

I think you want to add your own Avatar. In the yellow bar at the top of any DaniWeb window, cluck "Contro Panel" link. In the left side of the screen you see "Edit Avatar". You can use either one of the canned DaniWeb avatars or load your own from your hard drive.

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

Debug -> Start Debugging

Or just press F5

either way works.

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

How old are you?

I'm only 29 years old :) Old enough to have seen Elvis live on the Ed Sullivan tv show -- in B&W. Old enough to have seen all the I Love Lucy shows when they first ran on TV. Old enough to have seen the first run of The Lone Ranger tv show. Need I continue ??

Nick Evan commented: 29.... you wish :) +19
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'm not sure it can get much faster, have you used a backup program? They can take hours to do their job.

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

I m surprised and wanna know that how the compiler understand the sequence of how data was entered. as i didnt use any space any tab not a new line, how it can point to the original value from a
single line..?????????

The compiler has no clue how to interpret those digits. The only way it will work is if you write a space, tab, or some other character that acts as a separator.

It only appears to work -- that read loop didn't actually do anything because there was probably an integer overflow error on the first read. What you saw on the screen was the old data left in the array after keyboard input.

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

Yes, may Michael Jackson Rest In Peace:icon_cry: I will miss him, his music will NEVER DIE thank you Lord for Michael Jackson and all the good that he did for this world, and only lived to be 50, this news did affect the WORLD's population.
I thank you Lord that he is out of pain. I hope to learn more of how he passed. Did the doctor give him the wrong meds?:icon_question: [TEX]LOVE YOU MICHAEL JACKSON, always have![/TEX]

I wonder if those little boys he molested are that thankful.

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

>>vec_enc_data.push_back(enc_data);
I think the problem is that enc_data is the same for every row in the vec_enc_data vector. What you probably need to do is allocate a new array for each row

uint8_t* ts_checksum;

...
ts_checksum = new uint8_t[32];
getHash(sencdata,enc_data);
...
vec_enc_data.push_back(enc_data);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

> Did Farah Fawcett really do anything to impact our lives so much? :P

She was on the cover of PlayBoy at age 47 :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
tux4life commented: Excellent! +10
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The first time next_word() is called the first parameter should be instring. After that, the first parameter should be parsed because that is a pointer to the next part of the string in instring. If you type "Now is the time", the first time next_word() is called instring will be "Now is the time", and the function will set parsed pointer to "is the time". The second call the first parameter needs to be "is the time", which is in the parsed pointer, not instring.

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

This is how main() should be written. I'll let you figure out how to write that next_word() function

int main ()
{
    char instring[MAXLENGTH];
    char *words = NULL;
    char* parsed = NULL;
    printf("Enter text of line\n");
    fgets(instring, MAXLENGTH, stdin);
    words = next_word(instring, &parsed);

    while (words != NULL)
    {
        printf("%s\n", words);
        words=next_word(parsed, &parsed);
    }
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you should have received a warning on line 48 -- remove that semicolon!

You are getting seg fault because line 63 is dereferencing a NULL pointer. The second parameter on line 26 is wrong, as well as the declaration on line 13:

char* parsed = NULL; // only one star, not two
...
// now pass parsed by reference
words=next_word(instring, &parsed );

line 44: What is your intent with that line?? You can't pass NULL as the second parameter to strspn() because it will cause seg fault.

Actually I'm confused about what you want next_word() to do. How is it going to be different from just strtok() ? Or are you required to write your own version of strtok() ? If that is true, then you need to read the description of strtok() so that you can try to duplicate it. The function you have posted does not work.

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

I compiled the code you posted and did not get that error. Instead I got a link error stating that you did not code the function called print_heading().

line 59: using an uninitialized variable. You need to just delete that variable and all references to it. Replace course_grade with grade (from the function parameter).

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

At least two ways to accomplish that
1) make a global char* array that is a duplicate of the argv parameter and let each thread access it.

2) pass an argument to the thread when the thread is created. Exactly how to do that depends on how you create the threads.

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

>>words=next_word(instring, '\0' );
The function returns char* but words is an integer. The warning should not have been ignored. Fix it instead of ignoring it.

The second thing wrong with that line is that the second argument to the function is supposed to be a char**, not a single character. Learn to be more detailed-oriented and pay attention to what you are doing.

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

You mean you want to pass argv[1] to thread #1, argv[2] to thread #2 etc. ? Seems pretty trivial to me.

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

Michael Jackson was a poster child for not getting too famous and too wealthy too young!

LOL That was the funniest statement I've read/heard all day :)

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

Instead of posting all your errors, why don't you try reading the error, look at the line in your code, then correct the error. The error message for line 109 is very explicit -- look at the parameters passed on that line then look at the function declaration in the class. There is obviously a difference.

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

Lots of peopel will be angry if they bought tickets for his UK tour which was meant to start soon.

I suspect they will get their money back.

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

A program that runs on the development computer but not on other computers normally indicates there are one or more missing DLLs on the computer that it don't run on. And that is usually because the program was compiled for debug, not release. Recompile both the application and DLL for release mode and retest to see if that fixes the problem.

You might also run the program depends.exe found in the compiler's bin directory. It will tell you what DLLs are needed to run the program.

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

>> s1.print.heading();
That should be s1.print_heading();

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

died today of heart attack. RIP.

ahihihi... commented: he had a bad background but his songs are remarkable in the history :) +1
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 56: int rational::Add(rational r) What do you expect the Add() function to be doing? line 58 creates an uninitialized variable of type rational and you are using its random contents in lines 61 and 62. The result of that calculation on line 64 will be garbage.

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

line 11: you need to pass the structure by reference so that changes made in that function will be retained by the calling function. Do it like this (see the & operator) void read_rec(product& p) line 25: sizeof(temp) does not produce the size of the product structure but the number of bytes in the entire array. If you want the number of elements in the array than do it like this: rec_length = sizeof(temp) / sizeof(temp[0]); If the file is a text file then it can not be read like you are trying to do in that loop beginning on line 29. If the file is binary, then you have to specify ios::binary in the open statement on line 26: fin.open("inventory",ios::binary | ios::in);

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

Post code because we are not clairvoyant.

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

There are lots of different c++ coding standards that people use. No one agrees on everything, but almost everyone agrees that goto is unnecessary most of the time. Study other professional programmers code and pick the coding standard you like the best. And don't be afraid to change from time-to-time.

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

Yes, you have it right now :)

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

Read these google links about goto. The main reason its considered bad it because it makes the program very hard for others to read and understand. If you ever get a job writing programs then you will not be the only person reading the code you write. So you have to make the code as easy to understand as possible.

In the code you posted in that other thread the goto statements were not even needed.

The cin.get() you posted makes the program stop execution until you have a change to read whats on the screen and press some keyboard key. Similar affect as the "Press any key to continue" message you sometimes see.

cin.ignore() is usually used to ignore the next key in the keyboard buffer. You need that after entering numbers because the <Enter> key, which is identified as '\n', is left in the keyboard buffer.

int n;
cin >> n;
cin.ignore(); // discard the '\n' key
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you would have to use new operator to allocate the array size, or you could create a linked list of integers. Something like this -- warning: not compiled or testes. As you can see its a lot easier, safer, and less coding to use std::vector.

const int blocksize = 10;
int asize = 0;
int cur = 0;
int* matrix = 0;
int n;
while( cin >> n)
{
   if( cur == asize )
   // if matrix is full, we need to realocate with more space
   {
      // allocate new temp array
      int* newm = int[asize+blocksize];
      // copy old matrix to new matrix
      for(int i = 0; i < asize; i++)
        newm[i] = matrix[i];
      // delete old matrix
      delete[] matrix;
      // set pointers
      matrix = newm;
      // bump matrix size
      asize += blocksize;
   }
   matrix[cur++] = n;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

misspellings mostly

class A
{
public:
virtual vector<int> getSomeStuff();
private:
};


vector<int> A::getSomeStuff()
{
    vector<int> ay;
return ay;
}

int main()
{
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

use a vector

#include <vector>

int main()
{
    vector<int> ay;
    int n;
    while( cin >> n)
       ay.push_back(n);
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>Is there an easy way to read a line of numbers and store each number into an array?
Yes -- juse use cin's >> operator to get each individual number

int i = 0;
int array[255];
while( cin >> array[i] )
   i++;

you can also use stringstream class in conjunction with getline()

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

>>It's a habit of mine to always put my else statement in brackets,
That is an excellent habit to get into. :) In the code you posted those brackets are necessary.


The else only belongs to the last if statement. IMO it would be better to use else after each if. This prevents unnecessary comparisons.

if( fruit == "Apples")
{
   // blabla
}
else if( fruit == "Oranges" )
{
   // blabla
}
else if( fruit == "Pears" )
{
   // blabla
}
else
{
   // blabla
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

how do you describe the feeling when you give a birth to a kid?

I herd it described like this: Grab your scrotum with both hands and stretch is up over your nose.

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

Welcome to DaniWeb. I happily see that we are in the same age group, as well as at least one other DaniWeb member. Hope you stick around and enrich us all with your wealth of experience and knowledge.

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

Why not using a stringstream ?

Because its overkill. A simple subtraction will do as previously posted.

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

-- when my parents took me fishing, I had one foot on the boat and the other on the bank ... well I suppose you imagine what happened as the boat started floating away :)

-- when my sister and I got into a flour fight.

-- when my wife and I took our 5-year-old son to a rodeo, he had a great time laughing at the clowns.

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

I just created a new Windows Forms project, and Form1.h is 66 lines, including blank lines. There is no Form1.cpp file, but there is a <project name>.cpp that contains main() with a few lines of startup code.