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

tax information is required only if u are a US citizen.....if u are not US citizen...u can reply to every field with a no......that much info will be sufficient....

I'm no tax expert either, but I suspect tax info is required of non-US citizens also if their web site is hosted in the US. Citizenship has nothing to do with it, its where the business (web site) resides.

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

Yes, I agree with joe -- that is a good change. :)

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

Oh! The Sky Is Falling! :eek: The Sky Is Falling. :eek: :mrgreen:

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

Reminds me of The Planet of the Apes and Charlston Heston.

>>I guess I just finds the idea of humanity "destroying" itself somewhat funny
You can start laughing when Iran sends a nuke or two to Isreal. Iran is probably the only nation at the moment crazy enough to do that.

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

Not me -- I can't draw a straight line with a ruler :mrgreen:

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

Here are some tutorials

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

Heres some reputation your way for being so kind.:) :) :)

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

If you can get a 4-year college degree, then do it. Computer programming is highly competetive so the more education you have the better off you will be.

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

I like that change -- now we can turn line numbers on and off as we please. Hope you keep this feature. :)

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

you aught to post your web site in the Web Site Reviews board to see what others say about it and possibly give you suggestions for improvment. I personally didn't like its look, but maybe younger crowd will.

As for your question, I'm not qualified to make such recommendations.

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

fgets() doesn't know the difference between characters, such as 'a', 'b', 'c' ... and numbers such as '1', '2', '3' ... '9'. In the file they are all just text. If you want to treat all those numbers as text, read the file line by line, then just use fgets() the normal way

char line[80]
FILE* fp = fopen("data.inp","r");
while(fgets(line,1,sizeof(line),fp)
{
   // do something
}
fclose(fp);

If you just want to add more lines to that file, then it isn't necessary to read it at all. Open the file for append and start writing -- new lines will be appended to the end of the existing lines.

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

what I see in the C/C++ board is about 3 inches of white space between the quick edit box and the ad strip on the right side of the page. This board (DaniWeb Community) does not have an ad strip on the right so there is about 4 1/2 inches of white space. Why not just widen the quick edit box to fill up some of that unused space?

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

why store them in db? can't you just recreate the calendars whenever needed? If you want the calendars for storing other data in each date then you probably have a major table(s) design flaw.

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

what operating system and compiler?

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

The problem might be the way your database makes string comparisons. Depending on what database you use you can probably set it to do either case sensitive or case insensitive comparisons. Also check the password that your program is actually sending to the db to make sure it has the correct case -- are you sure your program is not converting the string to lower case?

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

maybe this short tutorial will help you. Follow the link near the bottom of the page for other tutorials.

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

And you did all that complaining for nothing :)

Just proves you can teach old dogs new tricks afterall :mrgreen:

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

Here is information you need. After creating a semaphore your program calls one of the wait functions to gain access to it. When the ReleaseSemaphore() is canned another thread that is waiting will be released.

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

Like I said, now just hover over the button with the arrow on it (next to the last post time) to see the last post title and author.

Oh I see now how it works. The arrow will jump to the post. Nice change :) :)

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

Like Dani said, no information has been removed.

That page used to contain links to the most recent post, which I could click on to quickly see what was posted. Those links are no longer there. Its not a real big deal for me that they are gone, but it was pretty convenient.

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

Regarding color changes, threads used to look like this:

www.daniweb.com/techtalkforums/getdaily.html

And now threads look like this:

www.daniweb.com/techtalkforums/forum8.html

I like the new color scheme better than the old one. But I don't like this change because it doesn't give me as much information as the older version.

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

yeah hey guys i heard the funniest thing today, i was speaking to an american in battlefield 2 (game) and he asked where i was from and i said the UK and he replied, what state is that in! :)

That is actually an old American Texas joke because the state of Texas was the largest state until Alaska was admitted to the union. But one should probably be American to understand it. Where ever you say you are from I will respond with "Oh -- what part of <where ever I am from> is that in?"

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

what compiler are you using? you will need eVC++ 3.0, eVC++ 4.0 or a smart device project with VC++ 2005 ( except Express edition). Those are the only compilers I know of that will target WinCE operating systems.

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

And you should know that none of those functions can be used with any modern 32-bit compiler. You need to use ancient compilers such as Turbo C or Turbo C++.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
char buf[BUFSIZE];
 do {
   in.read( buf, BUFSIZE );
   std::streamsize n = in.gcount();
   out.write( buf, n );
 } while( in.good() );
 if( in.bad() || !in.eof() ) {
   // fatal error occurred
 }
 in.close();

One problem with the above code is that when end-of-file is reached and write() will be executed with 0 data to write, such depending on implementation, might in worse case cause an exception.

I agree with the others that its best to avoid using eof() or feof(). There are other more efficient ways to code a loop like that.

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

If you have to do it in C, here is a good tutorial to get you started. You will need a good knowledge of c language.

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

>> ch = cin.get();
you should use infine, not cin

ch = infile.get();

And thanks for taking the time to read the board's rules to use code tags correctly. Not many first-time posters do that.

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

This might help. This is for WinCE operating system and may, or may not, work on MS-Windows.

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

If you must do this in c++ then use MFC or some other GUI system as jamthwee mentioned. QT is another free one and portable between *nix and MS-Windows (probably MAC also). Note that none of these are trivial to learn -- MFC for example on average has about a year's learning curve to learn it well, although basic windows can be produced in just a few minutes.

If you are not restricted to using c or c++ then you would probably want to use something like C# or VB.

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

C++ compilers for MS-Windows operating system can compile either console programs, which normally opens a DOS-like window, or a GUI window like you see with your VB compiler. The reason is that many c++ programs do not need GUI windows because they do things that do not require a GUI or human interaction.

>>Is VB the only way the program will open up in a windows like window?
No, Visual Studio C++ can create them too (so can Borland and many other compilers). When you create a new project you have a choice of either creating a Console application or a Windows application. But windows programs are not as easy to code with C++ as they are with VB. Here is a tutorial to get you started, but you will need a basic understanding of C language.

Colin Mac commented: nice clear help +1
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There are too many holidays and this one we can do without. One doesn't need a holiday to show how much you love someone.

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

Is there any particular reason to start the quoted block with a backtick (`) and end with a single quote (') ? .

I had missed that part of your question. I suppose its just for aesthetics.

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

The quotes make it unambiguous what the user is supposed to type. If you left the quotes out, someone will probably try this

c:>hello to invoke system shutdown <Enter key>

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

This is why I use Assembly for all my programming needs

I suspect you are writing rather small systems programs, things most end-users will not see.

If one writes 'real' applications and not toys is sure that it is the other way round. I am wondering, what kind of applications we are talking about.
...
speak for your self! I write mainly 32-bit applications for windows and I am VERY productive.

I can write a complete working non-trivial MS-Windows application in about 5 minutes with Visual Studio 2005 (actually, the IDE will generate it). How many days/weeks/years does it take you to write the same application in pure assembly?

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

I immediately need to find a project title for my sem project
Please send any emerging topic for me. I am doing my B.sc computer Science final year

Did you forget to ask a question or post a response :?: :?: Just quoting the oritinal posters question isn't really helping you very much.

arjunsasidharan commented: lol! they are desperate for a project or a title Mr.Dragon +3
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

This is compiled and run with VC++ 2005 Express with no errors.

class A;
class Base
{
private:
	int m_x;
public:
	friend A;
	Base() {m_x = 1;}
};

class A : public Base
{
public:
	A() {m_x = 2;}
	int getX() {return m_x;}
};

int main()
{
	A a;
	cout << a.getX() << endl;
	return 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

**NOTICE: May contain adult language

Don't you mean "NOTICE -- It contains obscene language"

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

And YOUR conclusion is: no matter what language you use or what code you write, final binaries will have the same speed ...

Not so -- bad compilers or unoptimized code will produce slower binaries. Different compilers will produce very different binaries (*.exe) even with the same source code. That is one of the bench mark test that many companies perform on compilers.

My conclusion: Assembly language can produce by far the fastest and smallest binaries

Yes it could, but whether it does not not is highly dependent on the skills of the programmer.

One can be AT LEAST as productive as can be with any other language because he/she will not be fighting with the HLL's limitations.

Totally agree with that statement. Assembly language is the LEAST productive of all languages (except machine language of course). Which is why no one writes anything but trivial programs in assembly language. Assembly is nice to know for all programmers, but not very useful for anyone other than those who design write compilers or operating systems.

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

This thread was started in February 2004. That's how many members we had back then ... and that's how fast we're growing.

Oops! I didn't notice the date that was posted:o

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

you might add some debug code in that thread that writes stuff to a file so that you can see where it might be failing. Of course this does no good if the thread doesn't start at all.

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

With over 3600 members and growing, I'm just curious how many of ya'll are original members who have stuck around through all the good and bad times? Who here has a user ID of 100 or less? 200?

my id is 46588 which is considerably higher than the 3600 you posted. Did you leave off a couple zeros? If not, what happened to the other 40,000 members?

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


I guess I don't qualify as an old-timer... *whistles*

neither do I, at 46,588

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

why don't you toss that horrible QBASIC and use something more modern, like the free Visual Basic 2005 Express. Its free for the downloading from Microsoft site. You can do all the printing your heart desires :)

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

All those functions are Borland-specific and not supported by any other compiler. You have to learn how to write windws gui programs by first creating a win32 program, not a console program. There are lots of tutorials to bet you started.

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

Tutorial is here

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

call time() to get current time in seconds, then localtime() to get tm struct. Then change the hours, minutes and seconds to 0, then call mktime() to normalize it and get the size_t time you would get from time() function. The difference between the two size_t objects is the number of seconds since midnight that you want.

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

I'm confused. Why are moderators editing the colors of other people's code to begin with?

Because many users use color tags instead of using code tags. The original link to this thread which ~S.O.S.~ kindly corrected had both color tags and code tags, and the color tags were still visible making the code difficult to read.

I've seen some posts that contain hundreds of those color tags. I don't edit them out because it just takes too much time. I don't think I should have to spend a great deal of time deleting each one of those [ color=1234 ] and [ /color ] tags with a very high probability that I will delete something else I should not; I'm not that patient and I don't want that much torture. Which is why I started this thread -- the color tags appear as if they were machine/program generated.

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

executables normally do not contain symbols unless compiled for debug. But compilers will often create map files that contain the mangled names. Check your compiler's documentation to see if it has an option to generate a map file, most likely it does.

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

Oh! thanks for pointing that out, I had not noticed it.

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

T num[i] = a - 48;

I know it doesn't really matter to the compiler whether you subtract 48 or subtract '0', but I think '0' is more intuitive