Search Results

Showing results 1 to 28 of 28
Search took 0.01 seconds.
Search: Posts Made By: cosi ; Forum: C++ and child forums
Forum: C++ Oct 8th, 2004
Replies: 3
Views: 4,455
Posted By cosi
You have to turn terminal local echo off. This is often specific to what kind of terminal you are using. Are you using the windows command prompt?


Ed
Forum: C++ Oct 5th, 2004
Replies: 1
Views: 22,301
Posted By cosi
Trace the execution of your code.


// here let's say that hours = 23
calculate(hours, minutes);
void calculate(int& h, double& m)
...
if(h>12 && h<=24)
{
h=h-12; // Now...
Forum: C++ Oct 5th, 2004
Replies: 3
Views: 7,357
Posted By cosi
I don't quite understand what you are asking. If you could clarify, I can give you a better answer. There is an excellent tutorial on opening and reading/writting files here...
Forum: C++ Sep 1st, 2004
Replies: 5
Views: 3,616
Posted By cosi
Also I didn't notice this at first:

What you really want is so that if you check every item and it equals '==', then you return true. If you ever see a mismatch, you dump a false.



bool...
Forum: C++ Sep 1st, 2004
Replies: 5
Views: 3,616
Posted By cosi
Here is your problem. You are assigning p[i] to c[i]; basically copying the values from one array 'p' into array 'c'.
if( c[i]= p[i])


What you really want to be doing is the '==' equals to...
Forum: C++ Aug 26th, 2004
Replies: 9
Views: 2,935
Posted By cosi
char c='A';
char *p;
p=&c // <-- should read a pointer (*) to char named p gets the the address (&) of char c
Forum: C++ Aug 25th, 2004
Replies: 9
Views: 2,935
Posted By cosi
char var1, *ptr1; // <--- * goes here
var1='X';
ptr1=&var1;


It's important to remember that you need '*' for each pointer variable. Therefore: char* ptr1, ptr2; doesn't work as intended....
Forum: C++ Aug 20th, 2004
Replies: 2
Views: 1,641
Posted By cosi
There is no right order. You might even want to play with all of the above and see which one you like the most. Learn that language well, then move on to another. The languages aren't that...
Forum: C++ Aug 20th, 2004
Replies: 13
Views: 15,469
Posted By cosi
Forum: C++ Aug 18th, 2004
Replies: 2
Views: 2,204
Posted By cosi
Please put the code in [ code ] [ / code] tags... it'll be easier to read.

Where is the error about null ofstream happening?

Here?
ht[i*NOLL+j].writetofile(of); //linkedlist
Forum: C++ Aug 17th, 2004
Replies: 97
Views: 25,603
Posted By cosi
Have you tried programming with Java and Eclipse's SWT? SWT GUI apps are actually quite comparable to native C++ programs. Java doesn't have to be slow, ugly, or a resource hog.

Check out...
Forum: C++ Aug 17th, 2004
Replies: 97
Views: 25,603
Posted By cosi
About the original topic: Languages are long lived and possibly immortal beings. There will always be C++ somewhere. Don't forget our Y2K fears about that ancient dino Cobol.
Forum: C++ Aug 17th, 2004
Replies: 28
Views: 5,455
Posted By cosi
If this is truly a C++ test, why the focus on so much C style code?
Forum: C++ Aug 17th, 2004
Replies: 28
Views: 5,455
Posted By cosi
Ah... It all makes sense now. I never did have much faith in certification programs. Best certification is demonstrated project experience. :-)
Forum: C++ Aug 17th, 2004
Replies: 28
Views: 5,455
Posted By cosi
Ok... I still have the stomach to answer your question. This time at least it's a different mistake ;-)

#define's can only be multilined if you do the \
at the end of the line


#define...
Forum: C++ Aug 17th, 2004
Replies: 28
Views: 5,455
Posted By cosi
Chainsaw your code is good. I think you are a fine engineer in the field.

I meant Mr. C++'s code is wrong. He uses * and & with no idea what those operators mean. I've explained it to him more...
Forum: C++ Aug 16th, 2004
Replies: 2
Views: 2,995
Posted By cosi
Hi the_one2003a,

What's the point of pointing to an enumerated constant? I think the key is that an enum is really a constant. An enum statement 'enum Date {mainX=1,mainY}' is almost like one is...
Forum: C++ Aug 16th, 2004
Replies: 28
Views: 5,455
Posted By cosi
No. Your code is wrong. I thought I taught you how pointers and dereferencing work. *sigh* I guess I won't lose my cool over your fishing for answers. Do heed our advice; All these questions...
Forum: C++ Aug 16th, 2004
Replies: 3
Views: 4,029
Posted By cosi
You seem to have two questions on your mind.

1) How do I have a member function length?
class String {

char* fString;
public:
// constructors
String();
String(const char*);
Forum: C++ Aug 16th, 2004
Replies: 6
Views: 2,984
Posted By cosi
There is a reasonably high learning curve for both DirectX and OpenGL for game programming.

Have you programmed GUIs before? If you haven't I'd recommend you start out with glut and OpenGL. I...
Forum: C++ Aug 16th, 2004
Replies: 28
Views: 5,455
Posted By cosi
Hi C++,

You cannot use a char* pointer for which you have not allocated space. char* support contains a junk value unless you do a) or b).

You can either
a) not use a pointer. do char[255]...
Forum: C++ Aug 15th, 2004
Replies: 6
Views: 2,984
Posted By cosi
What is it you wish to accomplish by learning these frameworks?
Forum: C++ Aug 15th, 2004
Replies: 2
Views: 3,944
Posted By cosi
pCat->Pointer says give me the member variable of the pCat instance object. pCat->Pointer is type int*. So we can do this *(pCat->Pointer) to get at the value.

Because of operator precedence...
Forum: C++ Aug 15th, 2004
Replies: 28
Views: 5,455
Posted By cosi
Hi there,

I think you better reread my post and think over the problems before asking for help. Right off I see that question #1 you should be able to fully solve yourself. I answered that...
Forum: C++ Aug 14th, 2004
Replies: 28
Views: 5,455
Posted By cosi
Hey Mr. C++,

You just got the semantics wrong. Remember that it is always something like this:

Always pointer to int = the address of a variable.

int variable;
int *pointer_to_int =...
Forum: C++ Aug 12th, 2004
Replies: 3
Views: 5,823
Posted By cosi
Uhh.. I clearly see that tleds has source code on their website. Check again. At any rate, you may do an exec C function to call the program setleds. This will also work.

Ed
Forum: C++ Aug 11th, 2004
Replies: 13
Views: 15,469
Posted By cosi
Actually you can do this programatically fairly easily...
Using Windows API's SystemParametersInfo with SPI_SETDESKWALLPAPER.
...
Forum: C++ Aug 11th, 2004
Replies: 3
Views: 5,823
Posted By cosi
Try using setleds. It comes standard on most linux boxes.
http://linux.about.com/library/cmd/blcmdl1_setleds.htm

For fun check out:
http://www.hut.fi/~jlohikos/tleds_orig.html
Blinking leds...
Showing results 1 to 28 of 28

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC