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

>>Far as the lines I need to find out in Visual C++ 2005 express to display numbers to figure out which number line that is
Just click on the error message and the IDE will move the cursor to the correct line. Also the current line number is always displayed at the bottom of the window.

>>error C2181: illegal else without matching if
I already told you what that error was -- missing opening brace {.

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

Just what I was looking for thanks.

But is there anything you can use when you don't have such permissions, i.e.

The program must be running as administrator, then it will have permissions.

the user of which you would like to impersonate is already logged on already and can therefore enter their password to confirm authorization?

Doesn't matter if the user is already logged in. You can log in as many times as you want.

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

you need an opening brace { between lines 53 and 54 (or at the end of line 53 if that is your coding style) and remove the semicolon at the end of line 58.

lines 78, 81 and 85. values is a 2d array of doubles and you are attempting to use them as if it is a 1d array.

You really need to start reading the error messages better and try to figure out what's causing them. The first error message for any given line number is usually the most important as the compiler will spit out several other error messages as well.

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

>>Can project settings influence the way escape characters work?
No -- they are set by the C and C++ standards and work the same way with all standards-compliant compilers. Your problem is something else. Did you check the file system to see that the file is where you think it is? If you are trying to use it in different projects then you will need a copy of that file in each project directories. If you want just one copy of that file then you will have to specify the full path to it instead of the relative path, or change directories (e.g. chdir() ) bto where the file is located before attempting to open it.

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

>>Actually the system I will be working with is POSIX based... But since I'm new to Multi-Threading and I currently use VS 7 on Windows I figured I would learn it thru Windows.

I think the only difference between POSIX and MS-Windows is the way threads are created. The actual thread functions should be pretty much the same except of course for os-specific function calls within the thread function.

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

Is England Vanishing?

Its been a downhill slide for the past 200 or so years. And it will be nothing more than a 3d world country in another 100 years, assuming we haven't had a nuclear war by then and destroyed the planet.

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

Fred Thompson for President :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :scared:

He did make a good da on Law & Order. Much better actor than Ronald R. was, but not even close to being the same kind of politician.

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

Did you initialize the Borland graphics library ? I don't know the call but I think there is a function that must be called before any of the other graphics functions.

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

And don't forget to close the file < CloseFile() > before leaving that function!

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

>>Is there any need to escape a Registry Key path when reading it from a file

No -- escape characters are only useful for string literals which are interpreted by the compiler at compile time.

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

>>please help me for solving my problem. I'm absolutly frustrated now
Not possible if you don't post the code.

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

Ah i see, i didn't know that... and this is true for all languages or just for c and c-based....I mean in case of pseudocode {or pascal..sic..} this rule applies?

No, just C and C++. Other languages may or may not follow the same rules. I don't know about pascal, you'd have to read the docs.

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

The problem is that we don't know if that great nothingness still exists. If it took one billion years for us to see the void then it will take at least another billion years to find out if it was ever filled with anything. Maybe right now that void is filled with millions of liviing stars and planets. No one on Earth will not find out for another billion Earth years.

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

that's better. The value of A[0] will be 1, from lines 7 and 8.

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

I don't think its undefined behavior, just bad coding. In function wow() x and z both are references to the same object, so any changes to x is also reflected in z. After line 7 is executed the value of both x and z is 1. After line 9 is executed they the value is 2. In line 20 the value of A[1] is unchanged and the value of A[2] is undefined because array A does not have 3 elements. At line 19 the value of i will be 2 (from line 9).

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

One thing that may cause that behavior is if the two functions are in different program units (*.c files) or libraries and compiled with different packing factors. Another cause is two functions in different program units using different versions of the same structure. Check your computer's file system to see if it has more than one copy of the header file in which the structure is defined. (Ben there, done that :) ).

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

read this article, especially the fourth paragraph.

Bench commented: Good link +4
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Because people have to cross ocean to get here?

Not a big deal -- people swim the English Channel all the time.

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

Japan is an island just like the UK, but they have zero immigration! Makes you wonder what they do?

Apparently they don't allow immegration.

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

To check a password on MS-Windows os all you have to do is attempt to log in with the user name and password -- there are win32 api functions that allow programs to do that, assuming it has appropriate permissions first.

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

The only two I have worked with are manufactured by Symbol Technologies and Intermec. Both cost several hundred $$$.

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

Hi

If u r working under linux

He isn't.

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

The IRS is an easy one -- the constitution says the gov can collect taxes. don't know about the others but probably because of the last phrase in that sentence> Since the USSC has not declared them unconstitutional then they probably are ok too.

or in any department or officer thereof

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

>>The Constitution does not specifically allow administrative law. So the EPA, IRS, FCC, ICC, FTC, and many other administrations are all unconstitutional.

Probably falls under Article 1, Section 8

To make all laws which shall be necessary and proper for carrying into execution the foregoing powers, and all other powers vested by this Constitution in the government of the United States, or in any department or officer thereof

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

read this and this

Salem commented: Some really nice info there +9
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Hm. I must have missed the Christian suicide bombings on the nightly news I don't watch.

Oh, I guess you missed the part about Christian Crusades in the Holy Lands in 10th century, or the Witch Hunts in America in the 17th century, just to name two events in our history. Christian history is quite bloody.

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

>>And the immigrants that have made the USA great are those that chose to join the melting pot, not those who chose to make the melting pot join them!

That's true for the most part -- but there other groups scannered around the country who choose not to fully integrate into American society, for example the Amish. But the major difference here is that Amish is a threat to no one. They pretty much stay to themselves and threaten no one outside their order. Muslem religion, however, much like Christianity, is hell bent set on conquering the whole planet and condems to Hell anyone who does not believe their religion. I don't really see a whole lot of difference between those two groups.

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

But they WANT multiple events going on. I DON'T!

You don't know the half of it. The companies that made the special equipment we needed for the experiments stopped making the equipment, because nobody made an operating system it would work with. So. last year, they closed our labs.

The problem is not getting the development software. The toll comes when you go to market your program. Microsoft OWNS part of it, and wants copyright royalties.

That's what I was doing.

That's what I DIDN'T want. I was calculating the sound pitch mathematically, based on what the user was doing.


That means I can't have any functions. It sends me back to the stone-age days of spaghettibowl programming.

I was using compiled BASIC. It is a lot different from the languages we have today, because there was a definite order of execution that you could implicitly control without having to play with handles and sleep.

Let's look at it this way.

When I started programming, the user's program was in control of all but the large multiuser computers. The operating system wasn't even running, unless the user's program wanted something. Then the operating system ran just long enough to satisfy the request, and then it shut off again. When the user's program ended, the operating system started to let the user choose the next program.

Now, like the MCP in the movie TRON, the operating system is in control. That's what BUSINESS wanted, so bosses could control what …

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

do you mean this ? Nope, I haven't the slightest idea.

Apparently you have posted the same questions on other boards.

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

rc is the value returned by CallDBService(), not the result set of the store procedure. Stored procedure result sets can have many columns and many rows of data. The rc value is probably a value that indicates whether the stored procedure was called, ran and completed successfully or not.

You will just have to read the documentation to find out correct syntax and hopefully it has a few examples too. Try to find out if whoever write those functions have a web side and user help group where you can ask questions from their experts.

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

afraid not -- have no clue what you are asking.

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

practice, practice and more practice. write a simple game, such as hangman or tick-tack-toe. The concepts will become more firmly set in your mind with more coding.

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

yes, use standard C functions in stdio.h such as fopen(), fseek(), fread() and fwrite() or c++ functions in fstream. They are a lot more portable too.

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

Also, Dani changed the rules a couple weeks ago and removed all rep that was given in Geeks Lounge. Many Members lost dots.

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

Of course it will work -- just fill in the SYSTEMTIME structure with whatever the user entered and call SetSystemTime(). I would first call GetSystemTime() to get current day, month and year, then change the other member values to whatever you want before calling SetSytemTime(). Note that SetSystemTime() expects GMT, which depends on the time zone. There are other win32 api functions you can call to get the computer's time zone setting. If your time zone is CST (USA Central Standard Time), you have to subtract 6 from the local time that the user enters.

Call SetSystemTimeAdjustment() to disable auto periodic time adjustments from outside sources because it will screw up your program.

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

win32 api SetSystemTime()

One problem with your program is that many computers automatically synchronize the system time with something else, such as a network computer or a satellite. In that case whatever you set the computer to will eventually be changed.

>> can't set the time during run time
why not? Its just a function that can be called anytime you want to.

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

>>Here's a sample, but I don't understand
And neither does anyone else here. That function is specific to the database library you are using, which you failed to identify. You need to read the documentation written by whoever wrote that function.

A more general way of accomplishing it is to use ODBC functions. Put the name of the stored procedure followed by all its parameters into a string and call it just like any other query, if the name of the stored procedure it Hello_World then it might look something like this -- note that string literals are in single quotes and integers are not.

char *query = "Hello_World 'param1', 'param2', intParam";

Now how to get the result set returned by the stored procedure is much more complicated, but identical to any other unbound query.

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

Hey Ancient, you could change the title to "Hell from Ubuntu".

Nope -- I'm not a moderator of this board. But I agree "Ubuntu Hell" (derived from "DLL Hell") may be a better title of this thread.

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

moved, but I don't know if it will help.

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

what are the errors. maybe you need to add braces { and } around lines 21, 22 and 23 to make them all part of the loop.

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

How do i pass by reference if am not going to assign a value to the variable.

Here is an explaination of references with a few examples

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

I see that the number is large enough but my mind still hasn't grasped how this number system works, is there some place I can read about it at my level to get my mind into how this works.
Thanks

A signed integer can hold any value between INT_MIN and INT_MAX which are defined in limits.h header file. If the number you try to store in the variable is outside that range then the result will be undefined, meaning that its up to the compiler what to do with the excess digits. Microsoft VC++ 2005 Express makes it negative (INT_MIN - 100). Other compilers may do something else.

An unsigned integer (one that does not allow negative numbers) can hold a value of UINT_MAX (see limits.h for definition).

There isn't anything more to it -- if you still can't grasp it maybe you are tring to make the concept harder than it really is. A measuring cup can only hold a cup of water -- if you try to put more water in it the rest will spill out all over the sink. Same itea with integers.

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

i don't mean to offend you dragon if i did i am very sorry...

No offense taken and no need for apology. The solution I posted will get you all the files in the directory and all sub-directories and puts the file names in a std::vector. Might be a little too complicated for new programmers though.

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

line 53 is missing the parameter to getmeaning().

Since this is a c++ program you should use references instead of C-style pointers. Makes the program less prone to errors

getmeaning(string& str);
..
void Dictionary::getmeaning(string& p)
{

}

..

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

Yes, call opendir() the readdir(). A complete workable example program is in the Code Snippets

>>i am using just a few functions of c++

That makes it a c++ program, not a c program.

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

what you need is a 2-dimensional array of integers with 10 columns and a dynamically expandable number of rows to hold the scores. Here is some more information about this:

After you understand multiple-dimensional arrays and how to allocate them then you will be ready to read the data into those arrays.

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

When writing MS-Windows programs I always used CreateThread() because it seemd to be simpler. There are several pitfalls with threads -- specifically you have to snychronize the use of variable and code that are commen to all threads. For example suppose you have a global variable that is set by one thread and read or set by a second thread. You have to use something that allows only one thread at a time to access that variable, normally by use of semiphore or critical threads. Also make sure the functions that each thread calls are thread-safe, normally the function's documentation will indicate whether it is or not. If not, then here again you will have to synchronize access to the functions similar to how I described above. The tutorial Dave posted might help a little, but Microsoft compilers don't support the POSIX methods described in that link.

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

you can also find the maximum values in the header file limits.h -- and most 32-bit compilers today support a 64-bit integers, such as __int64 (Microsoft compilers) or long long other compilers.

>>does this 4 billion refer to the numbers in quantity or the amount of numbers I can put on a line or what
It refers to the largest value that one 32-bit unsigned integer can hold (because it max value in hex is 0xffffffff). a 64-bit unsigned integer would be twice as wide, or 0xffffffffffffffff, or 18,446,744,073,709,551,615, a number large enough to hold even Bill Gates' and Donald Trump's checkbooks.

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

If you use win32 api functions there is an edit control that does most of that for you. You just have to implement the File and other menu items.

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

There are win32 api functions that let you change the shape of the cursor, but to change its speed and other configurations use the control panel.