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

You can buy Windows XP from amazon.com

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

what's the question?

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

Everyone can earn reputation points by making good helpful posts in any of the forums except in Community Center. No one, even the admins, get rep in the community center. If other members feel your comment are helpful then they will give you an upvote with comment. Upvote without comment does not provide rep.

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

VS has never recognized anything other than .h extension by default, so I doubt that is the problem. Most likely the .h file was added to the project as a compileable file just like the .cpp files. If that is the case then just simply remove the file from solution. Don't delete it from the file system or project folder, just from VS Solution Explorer window.

rubberman commented: Thanks AD - I haven't used VS for a LONG time. I'd rather get a good whack upside the head instead! :-) +12
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

"I could care less"

Guilty :)

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

header files are not to be compiled, they are just included in other *.c and *.cpp files.

// some \*.cpp file
#include <iostream>
#include "SalesP.h"

// rest of cpp code goes here
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

win32 api itself is a bit dated, most windows programs are written using .NET languages today.

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

All functions must first be declared before they can be called, that lets the compiler know the function's return value and parameter types. I was programming in 1980s before C and C++ standards, and I can't count the number of times programming errors were made because of lack of function prototypes. That was a huge proglem back then and consumed hours of debugging time. So don't think ISO committee required function declarations just for the hell of it. It became a huge time saver for all pogrammers. In those days Lattice C was the leading compiler for MS-DOS. The introduction of C standard made the company who wrote that compiler implemnent function prototypes, among other thangs. They had many problems doing that, the compiler was ridded with bugs, and they lost all their clients.

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

What operating system? What compiler? I would't do that -- it would take years to duplicate what other teams of programmers have already done, especially if you want cross platform. QT is probably one of the best free cross-platform GUI compilers, actually I think it's just an IDE and works with other compilers such as GCC, MinGW, and CL (M$ compiler).

But if you really insist on doing your own thing them be my guest. For MS-Windows you need to lear win32 api GUI -- it's all C language, not C++ but can be called from C++ as well. Here is a tutorial to get you started.

*nix isn't so easy as win32 api, if you want to start at the bottom you will have to learn X11R6. There are dozens of manuals that you can buy from amazon.com.

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

have you googled for tutorials?

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

As I recall it was a Unix computer that beat the world chess champion about 10-15 years ago. Pretty impressive feat, I doubt MS-Windows could have done that.

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

//No I do not have a glass eye

That sentence has double negatives, which in English cancel each other out, meaning you do indeed have a glass eye. That should probably be "Yes, I do not have a glass eye", very similar to the song "Yes, we have no bananas". Or just remove the leading "no" -- "I do not have a glass eye."

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

I think I like the original better -- "à propos" an attempt to mix French words with English. I've never ever heard anyone say or write that, had to google it to find out what it meant.

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

I don't like India spices, too hot for my blood.

Stuugie commented: I really don't get mlk3's comments, neither here nor in my PMs. Oh well, I don't like India spices either. :) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Do other languages have the same problem? I mean, do native French people find bad French grammar among native French people appalling? I know of people right here in St Louis, MO who are 5th+ generation Americans that can't speak/written a comprehensive English sentence to save their souls. Those are type types of people we are criticizing, not the French, German, Russian, etc. who have little English education.

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

If you don't know what you are talking about then how do you expect anyone else?? By your English grammer I take it you are not native English?

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

Huh? Would you translat that into English?

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

If all you want to do is access a database on another computer then you don't need client/server software. In the connection string put in the IP address of the computer that hosts the database. "Data Source=xxx.xxx.xxx" replacing the xs with the actual ip address. Here is a link for more info.

You might have to make sure the port on the computer hosting the database is not blocked by it's firewall.

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

spellcheck is the checkmark on the editor's toolbar. However some of it's suggested corrections are hilarious.

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

why are you calling strlen() so many times? Do you expect the length of the string to change?

int length = strlen(str);
for (int i = 0; i < length / 2; ++i){
    char t = str[i];
    int x = length - 1 - i;
    str[i] = str[x];
    str[x] = t;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

@AD - copy cat!

Sorry, I didn't see your post :)

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

The phrase's origins are unclear; some credit Louis Abolafia. Radical activists Penelope and Franklin Rosemont helped to popularize the phrase by printing thousands of "Make Love, Not War" buttons at the Solidarity Bookshop in Chicago, Illinois and distributing them at the Mother's Day Peace March in 1965. They were the first to print the slogan.[

wiki, the authority on everything.

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

more like Make love, no war.

Nope -- your daughter is right. (link)

Another way to say it is "Make love, make no war"

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

No. But google might.

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

Depends on the operating system and compiler. C language does not specify anything about GUI functions, entirely os and compiler dependent.

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

not going to happen. Post the code you have already done.

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

Do you already know how to query the database? What database? Is it a simple text file, and SQL database, or something else?

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

My guess is that Turbo C is just too old a compiler to do what you want -- 16-bit programs don't have very much memory so it may not be able to load the image. In that case the only solution is to use a modern compiler.

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

are you allowed to use another char array to save the reversed string? If you are, then start at the end of the original string and work backwards towards the first character, in the loop store each character in the second array from front to last.

For example, if the string is "abc" then start with the last character which is 'c', copy it to the first byte of another string.

There are several ways to accomplish that, but the simplest is probably calling strlen() to get the length of the original string, then a for loop to count from whatever that returns to 0.

for(int i = len; i >= 0; --i)

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

I try not to criticize people who don't know English, they most likely write in their own language then use a translator to translate into English. Those translators aren't very good sometimes. I don't know a second language but if I had to write a question in French for example my writing would be horrible to a native French person.

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

They close all schools here at the very thought of snow. I recall one year they closed all the schools and we didn't even get one snowflake!

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

what does that have to do with vc++????

OpenMP support requires compilation with GCC 4.2 (or later), or use of any C compiler supporting at least the OpenMP 2.0 specification.

It may not work with VC++. I don't know if VC++ meets the requirement. But it probably works with MinGW, the windows port of GCC. Code::Blocks is an excellent iDE to use with MinGW compiler.

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

Install the 32-bit version of the device driver if you compile vb.net for 32-bit program, which is I think the default. Are you using Visual Studio 2010 PRO because the Express version only compiles 32-bit programs.

I had a similar problem then found out that I had installed the 64-bit version of the device driver because my computer has 64-bit Windows 8.1. Uninstalled it and installed the 32-bit version of the device driver fixed the conflict.

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

Not that I know of. I don't know very much about java. But you might be able to use the same IDE, such as NetBeans (don't know about it either).

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

There's generally two layers of software -- os kernel which has direct access to all hardware, and application programs which are protected from direct hardware access. What you are asking is how to write os device drivers, which run at the kernel level. For MS-Windows you will need these tools. Here are some other links and tutorials to get you started.

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

M$ must have corrected the problem in later versions of the compiler. Suggest the OP update to VC++ 2014, which does not produce that warning for the code snippet he posted.

from someone who already has a very low opinion of MSVC compilers

For general purpose software you're probably right. But for MS-Windows specific VC++ can't be beat even by MinGW.

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

You never answered the last question, the problem states it's supposed to be in java.

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

Not surprised, considering that another thread revealed 1 in 4 people think the sun revolves around the earth!

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

Do you mean this one?

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

I already told you what's wrong with it, reread my previous post, second paragraph. You have the && and || operators mixed up. Sometimes even more experienced programmers have that problem.

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

line 10 is still wrong -- you failed to make the correction I pointed out. The pogram isn't going to work unless you increase the size of those two variables.

line 23: use && instead of ||. Let's say you enter "mm". Line 23 is going to fail because it's not "nm", so you need the && operator to say if it's not any of those strings.

line 41: Think about what the && operator does, according to line 41 you expect init_unit to be both "mm" and "cm" at the same time. Not possible. You need the || operator instead of && operator.

All the other lines foollowing line 41 are using the wrong && operator for the same reason as I mentioned above.

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

Is there any worng with my code?

Well, yes. Where's the loop? Test it yourself, it doesn't do anything like you said it should. All it does is either print the number of it's less than 10 or prints the number mod 9. In either event, the program is pretty much useless as it is.

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

class of girls with their ages and phone numbers (a little black book).

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

Or use std::set, which doesn't allow duplicates to be entered.

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

That means I have to declare as char init_unit[2] and sec_unit[2].

No, declare as char init_unit[3], sec_unit[3];

How do I take care of the parts where I have else if from line 58 downwards

By calling stramp() similar to how I showed you in my last post.

That would all be simpler if you used std::string instead of char arrays.

std::string init_unit, sec_unit;

Then you can use the == operator like you did, but still have to put the two characters in double quotes, such as "mm" istead of 'mm'

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

You need to fix all the compiler errors before you attempt to run the program.

the two variables declared on line 9 are too small if you expect to enter two characters on line 21. cin will add a string null terminating character, so increase the size of the two variables by 1 byte each.

if (init_unit != 'mm' || init_unit != 'cm' || init_unit != 'm' || init_unit != 'km')

Two characters must be enclosed in double quotes, such as "mm". and since init_unit is a character array you can't use == operator to compare it with another character array

 if ( strcmp(init_unit,"mm") != 0 ||  strcmp(init_unit,"cm") != 0 ||  strcmp(init_unit,"m") != 0 ||  strcmp(init_unit,"km") != 0)

You have the same problem in many other lines in that program.

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

This one shows the mouse over the variable, and I tried to click on it, to make it expand,

It won't expand if the variable is just a pointer because the debugger has no idea how many elements are in the array, or even if it is an array at all.

But if it's an array and not a pointer than click the + that's in the box just before the variable name.

AD: Do you mean in the Watch Window?

No.

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

The only way I know to do that is to move the cursor on the array name then an + will appear, select the + and it will show all array elements. You can even do that for linked lists, but only one node at a time. It doesn't work like that for pointers to arrays.

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

Icy, it rained last night and now it's all ice. Schools are all closed again today. There has been so many school snow days this year the kids will probsbly be in school all summer (Yea!)

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

lines 10, 14 and 18 are incorrect. What you did was pass a pointer to a non-existant byte in the string. This is how it should have been coded:
scanf("%s",name);

Notice it does not need the & address operator because arrays are always passed by address. That passes the address of the first byte of the string.

Another point about that program -- unless the length of the string can change during the loop you should call strlen() only once, save it in a variable, then use that variable in the loop. Calling strlen() on each loop iteration consumes too much CPU time.

int len = strlen(name);
 for ( x = 0; x < len; x++){