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

you can't. Only version control system that can store C++ files is Visual SourceSafe.

<irony mode off>
read the documentation, get the Good Book, and away you go.

Ok I bite. why is Visual SourceSafe the only version control system that can store c++ files ? :-/ I know for a fact there are others.

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

Install this c++ compiler, which includes an emulator

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

Have no idea what class Node is because I'm not reading your text book and listening to your teacher. Don't just post your assignments and expect us to do your work for you. Will be glad to help you if you post the code showing you are attempting to solve the problem yourself.

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

what operating system? If MS-Windows, what version ?

>>I did everything it said to do in the menus
what menus? what program are you using to do this?

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

Oh you should have left it as SilverFall because yes, it was a typo. After the character is revived all he is wearing is his skimpy underware. Fortunately I keep extra cloths and weapons lying around.

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

same answer we gave you last week. Join their mailing group and ask them your question.

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

please re-read my post -- I was probably adding the comments before you had a chance to read it.

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

>> my instructor says it doesnt really matter... what gives?
tell your instructor to RTFM! The c and c++ iso standards dictate that main() must always return an integer. I think you will find a lot of references to it here at DaniWeb. And here are quite a few references to it.

As for you program:
1. when a space is found you need to increment the i counter past all remaining spaces without counting them as words. For example if I enter "Hello World" your program will count a lot more then two words .

2. Don't know the purpose of lines 20 and 21. You should just delete them.

3. Inside that for loop check if the current character is a punctuation character -- see ispunct(). If punctuation then just ignore it and continue with the next charcter in the string.

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

I dunno about that... do windoze systems come with compilers on them? If your school uses macs then you might be in business, but I don't think windoze comes with any c++ compilers.

And when I think about the "editing cout" thing, it makes me think about overloaded operators. ^_^

you mean to tell us that a college that offers c and c++ courses, requires lab assignments, do not have computers with compilers already installed for students to use :-/

And to answer you question -- no MS-Windows does not come with compiler(s) already installed.

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

im not very good with c, im a web student not a programming one lol

i would be imbarrased to post my effort ;;

that doesn't matter -- we are all in your situation at one time. Just post what you've tried so that someone can help you out.

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

the computer at school should already have a compiler installed.

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

>>Does that mean just searching through the list to find the appriopriate priority

Yes.

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

try it and find out :) you can download Dev-C++ free from here, install it on the flash drive. I don't know if it will work or not, not sure if it installs any registry settings. If it does, then you probably can't use it.

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

this muslem stuff is nothing more than propaganda by the Clinton staff and her supporters. He was only 6 years old for God's sake when he was in Indonesia.

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

if your flash drive is big enough (1 gig or larger). But I wouldn't even consider running such a compiler from there -- it would probably be too slow. you might try Dev-C++, its 176 Meg on my hard drive.

Back in the old days (20 years ago) compilers fit on one 256K floppy disk. But those days are long gone.

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

that will probably work to just add the new node to the head of the linked list. To add in priority order you would have to transverse (iterate) the list and find the spot where the new node has to be inserted.

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

No -- you need one (or more) for each operating system. GNU compilers gcc and g++ are available on many operating systems, such it is just command-line driven.

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

Sorry, should have been ShellExecuteEx() and here

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

have you read the FAQ ? and discussion groups ?

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

Did you run the vista compatability program? It would have tested the computer's hardware and given you a report of what needs to be fixed.

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

Hey memory is cheap -- only cost $89.00 (USD). I have no idea what it would cost in India or UK.
And yes, I added it for just that one game.

SOS: Yes I mispelled it. It looks like an 'I' but is in fact an 'L'.

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

But in that case she was comitting a crime by ruling the country in the role of an elected official without being elected to that office...

Sounds rather serious, a willful and deliberate attempt to destroy democratic process.

Many president's wives have played important roles in their husband's administration, Hillary was just a little more involved than most. Walt's comment was certainly toung-in-cheek and expressed an opinion that many others hold too.

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

>>any ideas

Yes -- post code.

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

RandInvNormal() on line 10 is prototyped to take two double arguments. On line 27 you are attempting to pass two pointers. One or the other is wrong.

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

There are several wn32 api functions: CreateProcess() gives you the most control over the process. But SHExecute() mabe a little simpler to use.

>>but this is not portable
if you mean portable across operating systems, then that is nothing to worry about because neither are any of the win32 api functions. Portable among compilers? Yes it is because system() is a standard C function.

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

line 30 is illegal syntax. just initialize the int to 0

int grade = 0;

now after the user enters the grade at line 37 you need to validate it. If not valid then make him enter the grade again. You probably need to do all that in a do loop or a while loop, either one will work ok. Something like this sudo code.

while grade is not ok
    get grade from keyboard
    is grade between 0 and 100
    if it is then exit the loop
    otherwise if not display an error message
end of while loop
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

don't use scanf() in line 128 -- use fgets() instead which will take everything you type on the keyboard until the input buffer is filled up.

fgets(teamd, sizeof(teamd), stdin);
// strop off the '\n'
if( teamid[strlen(temid)-1] == '\n')
   teamid[strlen(temid)-1] = 0;

And that raises another point -- never ever at any time any place use gets() function because it does not check on the input buffer size and allows you to scribble all over the program's memory. Use fgets() instead, as illustrated above. Yes I know its a pain in the a** to trim off the '\n', but that is safer than corrupting memory.

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

I was thinking that too -- you should never try to install a program that was compiled for debug on another computer, for the very reason you just discovered. Glad you found the problem. :)

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

Here is a solution -- taken from that link I provided

char DecimalToHexa(int rem);
void hexaDecimal(int h, char* buffer, int bufferSize);
 
int main()	
{
	char buffer[8] = {0};
	int deci=115;
	hexaDecimal(deci, buffer, sizeof(buffer));
	printf("buffer = '%s'\n", buffer);
	return 0; 
}
 
void hexaDecimal(int h, char * buffer, int bufferSize)
{
    int rem;
    char output[8]= {0};
    char digit = 0;
    int i = 0;
    int j = 0;
    int k = 0;
    	
    do
    {    		
        rem = h%16;
        digit = DecimalToHexa(rem);
        h=h/16;
        output[i] = digit;
        ++i;
    } while(h/16!=0);
    if(h > 0)
	{
        rem = h;
        digit=DecimalToHexa(rem);   	
        output[i] = digit;
        ++i;
    }
    if(i >= bufferSize)
    {
        buffer[0] = 0;
    }
    else
    {
        for(j= i-1, k = 0; j >= 0; j--,k++)
        {
            buffer[k] = output[j];
        }
        buffer[i] = 0;
    }
}
 
    
char DecimalToHexa(int rem)
{		
	char c = 0;
	if( rem >= 10)
	{
		c = (rem - 10) + 'A';
	}
	else
		c = rem + '0';
	return c;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't think C language is the best for your situation. With such small amount of memory you may need to use assembly. Depending on your compiler C's startup code can be fairly large.

Here is a thread that may help you.

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

do you want to convert to a string? sprintf() can do that.

char hexval[8] = {0};
int n = 49;

sprintf(hexval,"0x%X", n);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why ? There are probably other more simpler and more portable ways to accomplish whatever it is you want to do.

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

what kind of prorogram did you write? .NET ? does the other computer have .NET installed? does it have the correct version of the windows DLLs ? The compiler bin directory has a depends.exe program that will show you all the DLLs that your program needs. Run it against your program and see if the other computer has them all.

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

If Hillary Clinton is nominated that will mean another Republican will win the WH. I know only one person who will vote for her. I'm not against a woman President, just not Halarious Klinton.

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

My son bought this for me a couple weeks ago, and now I'm hooked :-O My only real problem is my character dies quite often and then I have to go hunting for his stuff (he loses all his cloths when he dies). I really hate that in a game. If you like first-person hack-and-grab-the-treasure type games then this is a good one. But, if you're using Vista you will need lots and lots of RAM, they recommend 4 gigs. I started out with 1 gig but had to put another gig in my computer. It runs a lot better now, but would probably be even better with 4 gigs.

Anyone know of any mods or cheats for this game? I've searched google but did not find anything.

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

you could put the length of each string before it, which is similar to how I do it. Or terminate the string with a character you KNOW will never be in the string. Spaces are not good for this because the strings will probably have enbedded strings. The pipe symbol '|' or tab character are often used as terminators.

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

I'm a Republican who really loves what Obama has to say. He's pressing all the right buttons and, unless he screws up pretty badly, has a very good chance to be elected.

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

you will probably have to join their mailing list to get the answers to your questions.

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

Its not bits but bytes. The smallest thing you can send from client to server is a byte, which is normally 8 bits. The letter 'Q' is one byte.

>>Also when reading at the other end, i will have 3 bits of information in the string

No, what you probably mean is that the server will get 3 bytes of information. Just treat it like you would any other character array.

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

That's a mighty tall question that can have millions of answers. What kind of database? SQL or someting else? What are the names of the tables and fields ?

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

use a screen capture program such as this one.

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

>>can help me solve this question?

Can we Help ? Yes. Will we write it for you? No.

Do you know how to create a class ? If not then you should re-read the material in your text book. You can also see thousands of examples here at DaniWeb.

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

>>I don't know what a half adder
Neither do I. It must have been explained in class or in your textbook.


>>I need help as to write the driver .cpp and the other .cpp
Yes we will be glad to help you when you post the code you have written.

I think the variables you declared on lines 10 and 11 should be double, not bool. bool is for yes and no (1 and 0).

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

see line 1

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

TerminateProcess, but it might leave the computer in an unstable situation.

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

what I would do is create another list of all the modes. The way you have it programmed it can print only one mode. Create a 2d array, the first dimension will have the actual value and the second dimension the number of times that value occurs in the original array. Something like this (untested)

int array[2][length] = {0};

// populate array with values
int nItemsInList = 1;
array[0][0] = list[0];
array[0][1] = 1;
for(int i = 1; i < length; i++)
{
   // find list[i] in array[0];
  int found = 0;
   for(int j = 0; j < nItemsInList; j++)
   {
         // search the array for list[i].  If found, then just increment
         // its count.  If not found, then add it to the array.
         if( array[0][j] == list[i] )
         {
              array[1][j]++;
              found = 1;
               break;
          }
     }       
      if( found == 0)
      {
               // not found in the array, so we must add it here.
               array[0][nItemsInList] = list[i];
               array[1][nItemsInList] = 1;
                nItemsInList++;
       }
}

Now all that is left is to run through the array and find the items(s) with the largest quantity.

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

>>However, if there is no mode (every number only appears once), it just returns the first number for mode. if there is more then one mode, it just returns the first mode.

What behavior do you want it to do ?

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

great work :) The green color is a result of code tags. Now we have something to study.

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

The comma is necessary to separate the first and second parameters to fread() function.

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

Oh certainly. It is how it appears in the forum -- no formatting and everything in the left-hand margin. Makes it really difficult to read and most people will probably just not take the time to fiture it out.

What version of Visual Studio are you using? I don't have that problem with 2005.