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

You need to close the output file before opening the input file because some of the data has not been flushed to disk yet.

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

>>Why so many places to specifiy include directories
Those are not all include directories. Some of them are executables and libraries.

>>And secondly, where in the IDE can I found out what the environment variables $(VCInstallDir) etc
Write a program that displays the variable. But on my system it isn't defined until I get a command prompt. Here is a C program.

#include <stdio.h>
#include <stdlib.h>
#pragma warning(disable: 4996)
int main()
{
    char *p = getenv("VCInstallDir");
    if(p != NULL)
        printf("%s\n", p);
    else
        printf("VCInstallDir not found\n");
    return 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Because I don't live in the US I have virtually no legal recourse against the company that essentially took me for $3000.

That seems difficult to believe. Have you contacted legal console in your country?

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

Have you tried reading the other threads here? because several of them have discusses the same thing as you asked. But don't ask me because I'm completly ignorant of that information.

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

Probably depends on the company to which you apply for a job -- I suppose MCSD certs might make a difference between two people with equal education, experience, and knowledge. Otherwise they are not of much value. Why? Because people can pass the exams without ever coding so much as a single line of code. Just study the book and you can pass the exam.

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

To get a single character you have to flush the '\n' character from the keyboard buffer. Here is one way to do that

#include <stdio.h>
int main()
{
  int grade;
  int acount =0;
  int bcount =0;
 while((grade=getchar())!=EOF)
 {
     switch(grade)
    {
        case 'a': 
            ++acount; 
            printf("account = %d\n", acount); 
            getchar();
            break;
        case 'b': 
            ++bcount; 
            printf("bccount = %d\n", bcount);
            getchar();
            break;
        default:   printf("you enter wrong choice"); 
    }
  }
return 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Well, you can't use MFC because that is c++, not c. If you can use c++ then threre are several MFC tutorials.

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

Since displayMessage() is not a member of Salary class the compiler is looking for a function names getSalary() that is also not a member of that class.

One way to fix this is to make displayMessage a member of the class Salary::displayMessage()

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

Welcome to DaniWeb. You can put the URL to your site in your signature without us deleting it. Also if you want suggestions on improving it you can post the link(s) in Website Reviews

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

The reason it doesn't work for you is because after entering an integer cin >> width the system leaves the '\n' in the keyboard buffer, and the next time cin is called it gets that '\n' instead of wanting for another keyboard input. What you have to do is flush the '\n' from the keyboard buffer after the integer input. See this thread by Narue to see how that is done.

char myline[100];             <----- Does it have to do with this? 
    cin.getline(myline,100);

you can delete that if you use Narue's suggestion.

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

if i may say..Actually maybe some people even code nude :)...just saying...it suprised me in this movie where some painter used to do his work bare(and that is how he could only do it) anyways hope its an entertaining idea..

No way -- not in a roomful of other coders!:icon_eek:

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

.
oh and once the god come back,all the psychich on the earth will lose their powers but its for the greater good.=]

He's several years too late because all the psychics on tv have already been exposed as frauds. That's why we don't see them on tv anymore.

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

Is this a C program or C++ ? You included c++ iostream but ignored it and used C printf().

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

what is "/var2/local/include/getch.h" ?

where is phere declared ?

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

err i post just to tell you that the thread is irrelavent and should be deleted i don't think thats contributing to it...=]

We don't delete threads based solely on personal opinion -- if that were the case it would have been deleted after the initial thread starter. No, we only delete threads that are gross violations of the Rules.

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

Resurrecting old threads is not a problem as long as the new posts are relevent in context to the rest of the old thread. IMHO you can post here if you want to continue the interesting topic.

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

i need some help to make a verifir bytecode ?? can you help me ? plz

No one can help you in this board. You will have to post your question in the correct DaniWeb support board for your computer language of choice.

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

> vector <vector<string>> myvec;
In the next C++ standard, yes. Right now the way the parsing rules work mean that >> is treated as a binary right shift instead of the closing character for a nested template. It's ugly, but you have to put a space between them for the code to compile:

vector <vector<string> > myvec;

vc++2008 Express compiles it ok without the space. But maybe that is just an implementation thing. Dev-C++ considers it an error.

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

Ah Ha! The reason I did not recognize that construct is because it is a C++ thingy, not C. I come from C world. I tried to compile it as a C program and got lots of errors.

Learned something new today, and that's good :)

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

>>SudokuBoard.open ("1.txt", fstream::ate | fstream::binary);

Two errors with the above:
1) fstream::ate should be ios::ate
2) If you want the file to be a text file then don't use the binary flag.

>>SudokuBoard << Board[column][row];
Already mentioned twice, but a third time won't hurt. You need to add "\n" to the end like this: SudokuBoard << Board[column][row] << "\n";

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

Of course that is true -- In the USA they are called senators, congressmen, and lobbyists.

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

you have to add a second parameter. Read about them here. Use the ios::ate and ios::binary flag

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

Your teacher is correct. The reason your program does not work the way you want it to is because of the ios::app flag you added when opening the file. If you read the description here you will see that the ios::app

Set the stream's position indicator to the end of the stream before each output operation

All you really need is the ios::binary flag since you are writing the Account class as binary data ofstream outAccount( "accounts.dat", ios::binary);

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

i suggest you try to cap you'r price at $500.

but since you intend on 300, try out the 7600GS

very good card, i used to use one until i got 8800.

then i upgraded to 9800GTX.

maybe buy the 9800GTX its supa fast and the best bang for your buck card i will ever see!
i can run crysis at 4XAA and all on high.

Adverage fps is 35-40 on large map's

only $300 online and $480 in store for some reason.

You're only about 3 years too late with this post :)

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

MS-Windows is totally different from *nix. Expect to do major rewrites when porting to MS-Windows.

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

So I'm still having a ton of issues with my functions that pass by reference. The compiler is giving me numerous errors with both the call and the function itself.
Here is the simplest function that passes by reference:
Does anyone have some ideas what's wrong?

Yes --
1) pBoard is not a 2d array but a single dimension array.
2) you declared pBoard as a const, that means you can not change any of its values.

void Display(int Board[2][3])
{
     for (int row = 0; row <= 8; row++)
     {
          cout << endl;
          for (int column = 0; column <= 8; column++)
          {
              cout << Board[column][row];  // prints horizontally. 
          }
     }
}

int main()
{
    int Board[2][3];
    Display(Board);
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
reset(int (&Board)[2][3])

I have never in over 20 years seen anyone code a function prototype like that. Arrays are ALWAYS passed by reference, it is not possible to pass an array by value. So this is all that is needed void reset(int Board[2][3]);

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

Unless your program creates threads there will be only one thread in your program. The details are operating system dependent.

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

you need to post the code where the output file outAccount is opened

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

Instead of just begging someone to write your program for you why don't you try to do it and post what you have done, then ask specific questions about that you don't understand.

And stop posting the same question over and over and over and over ...

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

Come on, don't remove my thread.

Don't worry, I won't remove it, we only remove threads that violate the Rules, and there is no indication of that here.

This is a good idea.

Questionable. There is really no reason you can't do that now in Geek's Lounge to a limited extent.

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

Sorry, I can't help you because I don't know the first thing about that language. That would be pretty easy to write in other languages such as C, C++ or VB.

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

I will say that you have to think the way AD thinks

That would be a huge mistake :)

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

i hv tried it but i couldnt open it

Don't know why you couldn't open that link, but here is another one
from wikipedia

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

If the strings are always in that exact format than this should work.

int main()
{
    char s1[] = "www.clickajob.co.uk%2Fprofiles%2F316%2F6%2F|a/TLT10911641168.google";
    char s1a[50] = {0};
    char* pos;

    pos = strchr(s1,'%');
    *pos++ = 0;
    strcpy(s1a, s1);
    pos = strchr(pos,'/');
    strcat(s1a,"|");
    strcat(s1a,pos+1);
    printf("%s\n", s1a);
    return 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Oh, you mean keyboard input. In that case you need to create another thread. The main thread should do the timing and the second thread the keyboard input. When time expires in the main thread, main() kills the keyboard thread then does other things.

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

The code I posted is a single threaded program meaning that the code in main() stops while the code in Dial() is executed. The concerns you expressed are only relevent in multi-thread programs. If your program is not multi-threaded then don't worry about it.

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

What language is this? Your post looks like homework.

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

did you try google?

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

>> float x[n];
The error message means that you can not declare an array using a variable like n. Must have a const integer.

If you need to use the variable then allocate the array after the value of n is known.

float* x = 0;
<snip>
x = malloc(n * sizeof(float));

I assume you know that code has several other errors, such as missing { and } around multiple-line if statements.

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

>> shall we have to write this header file before executing the program.
Yes, or get it from whereever you got that *.cpp file. The file you posted is not part of STL because STL doesn't contain main().

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

>>program would remain in the loop for as long as the call proceeds
Do you mean that while loop that I posted? If not, then what loop do you mean

>>is there a 'cheaper' way out?
Probably not. I assume there is a lot of other code that you have not posted so I don't know how much resources you mean. Hardware today is cheap -- if the computer needs more ram then just toss it another memory card (assuming that is even possible). If you mean something like file handles then don't worry about that either as long as you close all handles correctly.

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

How about something like this:

void Dial(char* number)
{
   // the code you had in main goes here
}

int main()
{
    char phone[16];
    char answer[2];
    while(true)
    {
        printf("Dial a number (Y/N)\n");
        fgets(answer,sizeof(answer),stdin);
        if( answer[0] == 'n' || answer[0] == 'N')
             break;
        printf("Enter phone number\n");
        fgets(phone,sizeof(phone),stdin);
        Dial(phone);
   }
   return 0;
        
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

By stuck I suppose you mean the program goes into an infinite loop or possibly even crashes. You should fix the problem instead of attempting to hide it.

Nick Evan commented: Good advice +6
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Problem is fix now and everything working ok. Thanks.

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

Is it just my browser IE7 on Vista ? I don't see any submenus when I hover the mouse over the main menus such as Software Development. I deleted temporary internet files but that didn't help.

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

>>? Who said anything about porno ?
Maybe not -- but DaniWeb is devoted to IT. If you want a dating service then go elsewhere. I for one would leave DaniWeb if it were turned into some sort of dating service.

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

Ice tea straight up and diet coke. I drank a lot of coffee but had to give it up because it was wrecking my nerves.

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

This isn't a porn site, so don't bet that something like that will get started. If you want a dating service then go to something like MySpace.

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

A friend of mine just introduced me to lowrider videow on youtube. Many are very humerous

http://www.youtube.com/results?search_query=lowrider&search_type=