1,075,708 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?

Posts by nvanevski

That should be pretty straightforward. On a click of a button, take the Text property into a String variable, then with one "for" loop walk the string, take every character, get the integer presentation using the Asc function, and display it in the other memo.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

How about you to try to debug your code?

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

It might seem strange to you, but text files are binary, too. It's the application that treats them differently. For example, if you change the extension from .txt to .bin, the application will not handle it the same.

If you are more precise in what you want to do, we might be able to help you better.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

I am using Borland's C++ BuilderX Personal. Great tool, and also multiplatform. You can use the same IDE in WIndows, Linux, Solaris... Also good if you need cross-compiling. You can register your own preprocessors and compilers... In short-great IDE. Just don't expect any RAD development.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Besides, you do not have a break statement for case 3. You need to put break statements for each case.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Ok, bit by bit :

y=f(x) is the curve.

In our case, f is sin(), y is iSinValue, which makes x = count*PI.

What's not clear?

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

if you work on unix/linux, check the man page for getopt() function. It helps very much. At first it seems like an overhead, but in fact is very usefull.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Ok, I'll just give you a hint, try to do the program by yourself. Start with matching the characters on the opposite end of the string. On the first mismatch, get the rest of the string, create the reverse string from it and insert it into the right position.

When you do this kind of programs, try to document your thinking with code-like (pseudo-code) sentences. Helps a lot with actual coding.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

The error means that you are trying to access an uninitialized object (not necessarrilly NULL, but uninitialized). Having bad experiences with VS.NET debugger, my hint would be to inspect the objects that you use a couple of lines before the break line (as much I can see from the code, that would be the ptloci structure and its members).

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

I ran my C++ program and got these error messages. I have no idea what they mean. :?: Will somone please help.

error LNK2019: unresolved external symbol "int __cdecl GetInformation(int,int,int,char (* const)[15],char (* const)[15],float * const,float * const,float * const,float * const,float * const)" (?GetInformation@@YAHHHHQAY0P@D0QAM1111@Z) referenced in function _main

fatal error LNK1120: 1 unresolved externals

You sure did not get this message when running your program - it is a linker error complaining that it did not find a certain function (that would be GetInformation). You are not quite specific, but some of the possible problems would be :
- The function is in a library that you link statically to the program, but the library itself is not present;
- The function is in a C++ file that is not placed within a project, and therefore the compiler does not include it in the linking phase;
- You are calling the function with incorrect parameters, the linker tries to find an overloaded func with signature matching the call and fails.

So, check your libraries, your C++ files and your parameters when you call this function.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

Thank you for helping. The pointer-fix works ok, even though it's not exactly what I was hoping for.

Now a related question.
1. I've heard that using pointers makes it much more difficult for the compiler to optimize code. Will the forward declaration and pointer solution be comparatively slow, and is there any way around it?

I think you should use both solutions : make a forward declaration and use pointer dereferencing. If you don't use pointers, compiler allocates the objects on the stack, which is much slower than working with heap objects due to constant rearanging of the stack frame, besides it takes space in your code ("TEXT") segment. Pointer dereferencing is simply a register-register operation, or if the compiler decides not to optimize it, memory-register operation. Ever since 80486, both memory-register and register-register operations take one CPU cycle to complete (add one cycle penalty for indexed operations) versus 4-cycle PUSH/POP stack operations (a little less on Pentium CPUs). Even an optimizing compiler which would use EBP-based indexing to reach objects on the stack, is a subject to a two-cycle penalty for accessing objects out of +/- 128 bytes from the current ESP.

Bottom line : use pointers and do not be afraid. Especially with classes, where additional processing (virtual method tables etc) adds a lot of overhead to the dereferencing itself.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

what an idiotic rant that kid puts up...

If you don't know how to do things under Windows that doesn't mean Windows is bad kid.

No it doesn't, but it is bad anyway. Don't get me started, this is neither time, nor place for this. Besides, try to be less offensive, and try to be constructive for a change. It's easy to be rude.

It just means you're ignorant and may well be too lazy and/or stupid to even try to understand what you're talking about.
Now go back and play with your toys, try to get BGI to work under Linux and then come crying foul that that doesn't work either.

BGI does not work neither in Windows, nor in Linux because Borland BGI libraries use direct access to video hardware. This is not allowed in Pro versions of Windows, and certainly not in Linux. Use OpenGL or DirectX instead. OpenGL is not limited to the OS, while DirectX is limited to Windows only.

As to big graphics on Windows: the largest graphic I've so far used under Windows was a 6400x4500 (give or take a few pixels) file which was about 50MB on disk.
If that's not large enough I can tell you it's far from the limits of what Windows can handle. The current filesize limit due to using a 32 bit architecture (rather than 8 or 16 bit for DOS which imposes more limits...) is about 2 gigabytes.

No, that's not large enough. Try working with 12GB Maya movie, you'll see why Shrek and many others (Star Wars, for example) were rendered on Linux.

nvanevski
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0
 
© 2013 DaniWeb® LLC
Page rendered in 0.0765 seconds using 2.57MB