Search Results

Showing results 1 to 30 of 30
Search took 0.01 seconds.
Search: Posts Made By: stephen84s ; Forum: C++ and child forums
Forum: C++ Aug 20th, 2009
Replies: 4
Views: 348
Posted By stephen84s
Well As Far As I Know, that depends on what application you are making and what libraries you will be using. If you are going to make your application using just the Standard C++ stuff using the GCC...
Forum: C++ Apr 14th, 2009
Replies: 6
Views: 559
Posted By stephen84s
Well that could be accomplished by just a combination of <number>%10 and <number>/10. (Of course the <number> should be an integer).

First you perform a mod by 10 on the number, that would give...
Forum: C++ Mar 2nd, 2009
Replies: 1
Views: 262
Posted By stephen84s
I suppose JNI (The Java Native Interface) (http://java.sun.com/docs/books/jni/) is what you are looking for.
Forum: C++ Feb 25th, 2009
Replies: 3
Views: 297
Posted By stephen84s
Just observe the following code snippet:-

if(send = true)
cout <<"You have passed the exam!\n";
else if (send = false)
cout <<"You have failed the exam.\n";


Watch both the conditions...
Forum: C++ Feb 25th, 2009
Replies: 2
Views: 295
Posted By stephen84s
Newbie or Old geek, announcements (http://www.daniweb.com/forums/announcement6-20.html) exist in the forum for a reason.
Forum: C++ Feb 23rd, 2009
Replies: 5
Views: 278
Posted By stephen84s
Now I could be wrong (because most probably Java has numbed much of my C++ knowledge) but looking at your function :-


bool convertToCString(int& refConstInt, char** ptrtoCharPtr)


It is...
Forum: C++ Feb 19th, 2009
Replies: 2
Views: 288
Posted By stephen84s
Yep the missing "c" was never clear at first, only when I read the post over and over I figured it **seems** like a substitution ciper, where

c = \
A = :
a = Z
t = m
<SPACE> = x .. etc
...
Forum: C++ Jul 8th, 2008
Replies: 3
Code Snippet: Time and Date Display
Views: 4,941
Posted By stephen84s
To get this code to work on Linux, just replace the line system("cls"); with system("clear").
BTW gotta say a very nice and useful piece of code.
Forum: C++ Jul 7th, 2008
Replies: 1
Views: 602
Posted By stephen84s
Yes I do but may I see what have you tried or on what lines are you thinking, cause the main purpose of this program (most probably given by your instructor) is to train your brain to think of a...
Forum: C++ Jul 4th, 2008
Replies: 9
Views: 2,958
Posted By stephen84s
I think that was an important information u left out ;)
Yep, it does go into the infinite loop, but so does the first one.

But why exactly its occurring I cant figure it out, I hope some of the...
Forum: C++ Jul 4th, 2008
Replies: 9
Views: 2,958
Posted By stephen84s
Tried you code out in GCC 4.1.2, no problems, same output for both cases, no infinite loops!!
I had directly copy pasted your code.
Forum: C++ Jun 29th, 2008
Replies: 1
Views: 426
Posted By stephen84s
Rules (http://www.daniweb.com/forums/announcement8-2.html) for getting help in Home Work
Forum: C++ Jun 29th, 2008
Replies: 7
Views: 1,041
Posted By stephen84s
Why should someone else write your code for you ?
Lerner's already given you the actual ways you can go with the Logic, you just have to convert that in to your code.
As far as the way you should...
Forum: C++ Jun 28th, 2008
Replies: 7
Views: 1,041
Posted By stephen84s
Technically what you referring are called pseudo-random numbers and not actual random numbers, BTW can we see what you have tried or instead you could find the complete details for your program here...
Forum: C++ Jun 28th, 2008
Replies: 3
Views: 570
Posted By stephen84s
Take a look at how the getche() function works.
Forum: C++ Jun 28th, 2008
Replies: 3
Views: 825
Posted By stephen84s
// Line added here
lowest=sales[0];
for ( int x = 0; x < SZ; x++ ) {
if( sales[x] < lowest ) {
lowest = sales[x];
}
}

Your "lowest" variable needs to be initialized to the first...
Forum: C++ Jun 26th, 2008
Replies: 2
Views: 6,310
Posted By stephen84s
I dont know how your class is defined, but I am just gonna be doing a wild guess here:


employee *emp[10];
emp->outputData();

Looks like an array of pointers to objects of class...
Forum: C++ Jun 23rd, 2008
Replies: 1
Views: 343
Posted By stephen84s
Amazing I found the exact program you needed Here (http://www.daniweb.com/forums/announcement8-2.html)
Forum: C++ Jun 23rd, 2008
Replies: 6
Views: 1,353
Posted By stephen84s
Note the semicolon next to the while loop,

while(getc(pFile)!=' ');

Thanks to that, your while continues to run and skip all the characters on the line until it finds a ' ' <space>.

Just...
Forum: C++ Jun 23rd, 2008
Replies: 7
Views: 511
Posted By stephen84s
yep.. it does increase the "Solved Threads" count next to our names
Forum: C++ Jun 23rd, 2008
Replies: 7
Views: 511
Posted By stephen84s
I just checked "Var" and "Var2" are both "char" types, I think you can use "==" directly for checking for equality.

Following is the signature for strcmp ->
int strcmp( const char *str1, const...
Forum: C++ Jun 23rd, 2008
Replies: 7
Views: 511
Posted By stephen84s
Have u added #included<cstring> in the file which contains your class definition(ppoly.h).
you will need it for the strcmp() function which is on Line 51
Forum: C++ Jun 21st, 2008
Replies: 2
Views: 715
Posted By stephen84s
You need to compile C++ programs in GCC using g++ and not gcc.

g++ filename
Forum: C++ Jun 17th, 2008
Replies: 5
Views: 761
Posted By stephen84s
Hi Yuichi,
My suggestion is almost similar to Alex's, only looking at your prigram I think you should not only declare your array which which is holding the queue as global, but also a variable...
Forum: C++ Jun 14th, 2008
Replies: 4
Views: 894
Posted By stephen84s
Have you considered using a do{}while(); loop, where at the end of the loop you ask input from the user if he wishes to continue and check the same inside "while"
Forum: C++ Jun 14th, 2008
Replies: 1
Views: 447
Posted By stephen84s
You can try out using "fscanf" to read your matrix elements from files, or if you prefer going purely the C++ way I suggest looking at "ifstream" class
Forum: C++ Jun 12th, 2008
Replies: 2
Views: 447
Posted By stephen84s
"graphics.h" file if I am not wrong is associated with Borland's Turbo C++ compiler,
I do not think there is a graphics.h file for VC++, just like we dont have one for GCC
Forum: C++ Jun 11th, 2008
Replies: 7
Views: 4,867
Posted By stephen84s
Cool tried it out !!! Never knew about this !!!
Forum: C++ Jun 11th, 2008
Replies: 6
Views: 1,104
Posted By stephen84s
Should'nt declaring the object in C++ be like

int *t=...;
.
.
.
CSafePtr<int> myobject(t);

Rather than:
Forum: C++ Jun 11th, 2008
Replies: 7
Views: 4,867
Posted By stephen84s
In C++

char FilePath[]="...

is equivalent to :-

char *FilePath="..

so when you are passing the variable "FilePath" to a function, the function needs to accept a "char* "(or char...
Showing results 1 to 30 of 30

 


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

©2003 - 2009 DaniWeb® LLC