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

I just created a project using VS 2013 Pro on Windows 8.1 and had no problems. If your problem was a bug in 2010 then it's probably fixed in either 2012 or 2013 versions of VS.

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

There are many kinds of barcodes -- some contain more information than others. RFID contains the most information, such as nearly everything about the product (manufacturer, dates, shipping info, just to name a few). The person or company generating the barcodes determine what information the barcode contains. The most common -- UPC -- contains just numeric digits. Here is more detailed information about UPC and EAN barcodes.

As previously mentioned, you will need some kind of external scanner to read barcodes -- the scanners I worked with send my programs the barcode info as plain text data, usually by stuffing it into the keyboard buffer, or by making API calls to the barcode reader. Those API calls are totally dependent on the manufacturer of the reader -- there is no industry standard. That means you will have to read the programming docs for the readers you have or will have.

One of the most common industrial style external barcode readers is made by Symbols Technologies -- and they can cost anywhere from $30.00 USD to over $500.00 USD.

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

This is on my agenda today -- Happy (Hickup) New Year!

9361c2be19a491d7067ab6c9129da9cb

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

Please tell us what you enter. I don't read whatever language you wrote your program in, so I don't know what it is asking.

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

Do you have to use strtok() for that? You could just parse the string with a pointer, copying each field into another char array.

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

Suggestion: lines 54-57: It would be easier if you used std::string for pFullPath, then instead of calling strcpy() you could just use the assignment = operator. Then on line 62 just use pFullPath.c_str().

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

Is the file in the current working directory? If not then you have to add the full path to it. FindFileData.cFileName does not contain the path.

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

strtok() cannot be used the way you are trying to do it, you can't use it to count the repeating adjacent vowels because of the way strtok() works.

To determine the beginning and the end of a token, the function first scans from the starting location for the first character not contained in delimiters (which becomes the beginning of the token). And then scans starting from this beginning of the token for the first character contained in delimiters, which becomes the end of the token.

What you might do is to count all the characters in the strings returned by strtok(), then subtract that from the length of the string. The remainder is the number of vowels in the string. So, instead of counting vowels you need to count non-vowels.

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

You will have to read each file line-by-line and search for the string you want. Do that on line 49 of the code I posted, inside that do loop.

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

char check[]="'a','e','i','o','u'";

That does not produce a null-terminated string, which strtok() requires. Just do this:
char check[] = "aeiou";

But --- Deceptikon has a better solutiom.

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

You can learn all about it from here

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

The main reason your program doesn't work is because the first parameter to FindFirstFile() is incomplete -- it needs "\*.txt" added to the end of the path.

The following code works, but I've commented out some of your code. Note that when it is looking for specific file extension such as txt there is no need to check for folders attribute unless there are folder names with txt as an extension.

#include <Windows.h>
#include <iostream>
#include <cstring>
#include <string>
using std::cout;
using std::string;
using std::endl;

#pragma warning(disable: 4996)


void FindScarLog(){

    char pPathFolder[250];
    char pPathCommunicator[251];
    string FolderPath = "\\Documents\\logfiles";
    string CommunicatorPath = "\\Documents\\FileCommunicator.txt";
    char* pPathInit = getenv("USERPROFILE");
    char* pPathInitC = getenv("USERPROFILE");
    strcpy(pPathFolder, pPathInit);
    strcat(pPathFolder, FolderPath.c_str());
    strcpy(pPathCommunicator, pPathInitC);
    strcat(pPathCommunicator, CommunicatorPath.c_str());

    bool FileExists = false;

    if (pPathFolder == NULL) {

        cout << "Folder is NIL (Null)" << endl;

    }
    else {

        do{

            WIN32_FIND_DATA FindFileData;
            HANDLE hFind;
            string files = pPathFolder;
            files += "\\*.txt";
            hFind = FindFirstFile(files.c_str(), &FindFileData);
            if (hFind == INVALID_HANDLE_VALUE)
            {
                printf("FindFirstFile failed (%d)\n", GetLastError());
            }
            else
            {
                do
                {
                    cout << FindFileData.cFileName << endl;
                } while (FindNextFile(hFind, &FindFileData));
                FindClose(hFind);
            }

        //  if (file_exists("File.txt") == true){

            //  FileExists = true;

//          }

        } while (FileExists == false);

//      ofstream CommunicatorToFile;
//      CommunicatorToFile.open(pPathCommunicator);
//      CommunicatorToFile << "logfiles\\scarlog-random-date.txt";
//      CommunicatorToFile.close();

    }

}

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

I would be very surprised if you found any language translator that did the job 100% correct -- the .NET functions would be easy, but the rest nearly impossible due to differences in the two languages.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
if( strcmp(  i->next->data, step->data ) > 0)
{


}

I'm a newbie in C sorry i'm asking a lot

Not a problem -- we were all in your shoes at one time or another.

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

It looks like you are on MS-Windows, so you can use the win32 api function FindFirstFile() and FindNextFile() to get a list of all the files in the desired folder. They are pretty easy to use, and that link has an example program at the bottom.

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

I think all you have to do is change line 10 to use strcmp()

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

And between -10C and -20C is nice and comfortable.

I'll bet you all are sun bathing in all that heat :)

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

Your program has a few compiler errors that needs to be fixed before you can run it, and that may be why it exits unexpectadly.

line 29: There is no such escape sequence as \m

lines 106-121: All those times (second to last entries) are too big to fit into the structure. You need to increase the size of the char arrays so that they can properly fit.

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

Wow, that is worse than the artics lol

Naw -- just a bit chilly :)

Wanna trade?

-27C isn't really all that cold -- I've seen it colder in Iowa and North Dakota. I recall one morning when I was a teenager I got up early to milk cows (central Iowa), and the themometer read -40C. And that's one reason I haven't been back in over 50 years.

But that ain't nothing compared to the --89.167ºCClick Here recorded in 1983 on Antarctica's rocky ice-covered surface

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

check the following article nice summary

Yes, but not completly accurate. For example

  1. switch can work with enum or #define but not with const.

That's not true. This compiles perfectly

int main()
{
    const int x = 1;
    int m = 12;
    switch (m)
    {
    case x:
        break;
    default:
        break;
    }
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Too late -- you can't take back a wish.

I wish I knew everything about everything.

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

Granted, now all your bones creek, you're too fat, can't sleep at night, and have nightmares about wishing your life away.

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

Granted, you're now 80 years old and finished sophmore year in 1940.

I wish I never heard of this game.

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

Yo mama is so gorgeous I went blind when I saw her.

<M/> commented: lol... +0
DeanMSands3 commented: Way to fight the tide, AD. +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Granted, a dog bit your head off.

I which I had a Ph.D.

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

This is an English speaking forum, not many people here will be able to read that.

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

Sunny and warm here too -- we will most likely catch hell next month.

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

Granted - but they are negative rep points.

I which I could see snow again.

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

Why are you using arrays to solve quadic equation with three unknowns? This is how I was taught to solve them.

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

It becomes easy to spread a lie when no one knows what the truth is. - anonymous

If no one knows what the truth is, how can it be a lie?? For instance, if I said "the sky is red", and everyone is blind, then just because no one can verify the color of the sky doesn't make what I said a lie.

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

Tutorial here The free version may not describe what you want, I have a copy of the purchased version which as additional chapters and describes in detail exactly how to create database and tables from with VB.NET

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

Unseasonally warm today, didn't even need a coat. Supposed to get warmer this weekend. I thought it was supposed to be middle of winter, not spring :)

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

just after this i hve 9 idea how to store , read the space after each word n show output ,,,,

Please write in English -- I have no clue what you just said.

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

The only time I've ever seen goto useful is to break out of a very deeply nested set of loops. Too bad c++ didn't implement C's setjmp and longjmp functions because they would be similar to goto but could jump across functions. But of course that would be impossible in c++ because it would cause lots of memory leaks since class destructors wouldn't get called. I think throw is c++ answer to longjmp.

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

Please post the code you have done so far. No one here will write the program for you.

Hint: you need to know how to read text files.

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

Now that Christmas is over for another year -- Happy New (Hicup) Year everyone :) I plan to have a glass of champaign with a shot of brandy on new year's even.

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

Are you required to have a switch statement in your program? If not, then why not just simplify it by replacing the swith with the if statemsements in test()? Simple is good -- no point in making it more complicated than necessary just to show off your programming skills.

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

Visual Studio want angle brackets, not quotes, around the names of standard c++ and VS header files

#include <iostream>

void main

it's int main(), never void main() because main() always returns an integer back to the operating system.

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

I think Ebenezer Scrooge is the only one I've ever heard say the phrase "bah humbug", and then only in reference to the celebration of the Christmas season. Charles Dickens is the author who made that phrase famous. AFAIK it is never used for any other purpose today, at least not where I live.

And I am tired of having this conversation every Christmas

Then change your ways and you won't get to tired :)

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

Xmas is the version that takes the Christ out of Christmas

Actually, no -- xmas was the original spelling of Christ.

the "X" comes from the Greek letter Chi, which is the first letter of the Greek word Χριστός which comes into English as "Christ".[2]

I was going to downvote Happygeek for his Humbug comment until I read his reason for saying it -- then I agreed with him. Bah Humbug to the spammers :)

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

line 49: Why is time() part of the equation? rand() will generate a random number, no need to add value returned by time().
int secret = 1 +(rand() % 100);

lines 56-65: Use a series of if statements instead of that switch statement.

if( guess < secret )
{

}
else if( guess == secret)
{

}
else // guess > secret
{

}

lines 7-12: delete that enumeration -- I don't see any need for it.

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

Im unpopular no matter what i say so i decided not to care anymore. I have other things to worry about.

I don't know why you have so many down votes -- seems like someone doesn't like you for some reason. Sometimes we receive down votes for some unknown reason, I've received a few of those too. Just try to improve the quality of your posts and you will be given up votes.

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

The IDE should have told you what those error numbers mean and on which line they occur. We can't tell you much about them unless you post the complete code. google for the error numbers and you will find more detailed information about the errors.

If you don't turn off precompiled headers stdafx.h must be the first include in the program -- no other includes can appear before that one. With precompiled headers option turned on you MUST includer stdafx.h, you can't delete it or the compiler will error out. The option to turn precompiled headers on or off is given when you first create the project, but you can do this later after the project has been created if you want to.

How to turn off precompiled headers
In VS++ 2013, select menu Project --> Properties (last item in the list)
Expand Configuration Properties tab
Expand C/C++ tab
Select Precompiled Headers
on the right side of the window select the first item, Precompiled Header and change it's option to Not Using Precompiled Headers

901557570341da0634fcdb0ac5c8ee5e

Also, if you don't turn off UNICODE then the compiler will assume you want to use UNICODE style strings, instead of char* you will have to use wchar_t*. This affects both string literals and character arrays. If you are not interested in languages other than English, then I suggest you turn off UNICODE, especially when first learning programming.

How to turn UNICODE off

In VS++ 2013, …

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

Is the hard drive nearly filled up?

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

The limit only applies to old 16-bit compilers, and I think the compiler you installed is like that. Why don't you install either Code::Blocks with MinGW compiler or Visual Studio 2013 Express (both are free).

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

Jingle Bells, Jingel Bells,

Merry Christmas, and Happy New Year (Hicup!)

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

What new compiler did you install? Visual Studio will compile both 32 and 64 bit programs, its just an option change. The compiler itself is a 32 bit compiler and is always installed in the Program Files (x86) folder.

Is your entire program contained within just one *.cpp file? If you still want to use those old 16-bit compilers then try splitting the program into more than one file -- Turbo C++ probably attempts to put everything in the same *.cpp file into the same segment, depending on the memory model used. If you use the large or huge memory models then you can have bigger programs, assuming the program consists of two or more *.cpp files.

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

Do the assignment one part at a time, don't attempt to do them all at once. Write/compile/test the first part of the assignment. If you have problems post your code here and ask questions. No one is going to write your assignment for you.

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

I think all I have to do is delete c:\windows.old folder.

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

I just finished upgrading Windows 7 Pro to Windows 8.1 Pro. I thought it was supposed to keep all files and applications, but only a few of the applications were carried over. Seems like I have to re-install most of the programs, especiall games, Office 365, and Microsoft Visual Studio. All the data, such as My Documents and downloads were kept.

Now I'm pissed -- the reason I elected to Upgrade instead of Full Install (e.g. erase hard drive and start from scratch) was so that I wouldn't have to reinstall all the apps, many of which require licence keys.