Search Results

Showing results 1 to 28 of 28
Search took 0.01 seconds.
Search: Posts Made By: Daishi ; Forum: C++ and child forums
Forum: C++ Nov 9th, 2005
Replies: 5
Views: 4,145
Posted By Daishi
Well, one thing that you could do is to take away the couts and use printfs... Use fopen, fprintf, and fscanf instead of the std fstream stuff. Make sure all of your variables for functions are...
Forum: C++ Nov 8th, 2005
Replies: 13
Views: 5,230
Posted By Daishi
That may be true, but you should know that I had been using MFC exclusively for the past 3+ years...sigh... I had only found out about fltk and gtk within the past few months.

-Fredric
Forum: C++ Nov 8th, 2005
Replies: 13
Views: 5,230
Posted By Daishi
Actually, I do write programs with user interfaces in emacs IN Linux. I use gtkmm, and fltk. They are extremely easy to use, understand, and I don't need to constantly check back through...
Forum: C++ Nov 8th, 2005
Replies: 13
Views: 5,230
Posted By Daishi
In my opinion, if you can sit down in a simple text editor, and without looking at any notes, write out the code for a simple application, then you are using the right libraries for the job. If you...
Forum: C++ Nov 7th, 2005
Replies: 2
Views: 4,148
Posted By Daishi
Why not use a constant pointer to the vector? If the vector is not zero, then make a copy of it inside the function.


string whateverTwo( int a, const vector<string> *defaultV = 0) {
...
Forum: C++ Nov 7th, 2005
Replies: 13
Views: 5,230
Posted By Daishi
Sorry, I was referring to developing MFC applications, and I haven't seen anyone do it without that resource editor that comes with MSVC++ 6.0.. Seriously, do you know of any good tutorial or...
Forum: C++ Nov 7th, 2005
Replies: 13
Views: 5,230
Posted By Daishi
Sure. If you are just starting out with GUI's then stay away from MFC, far, far, far away from MFC. In fact, always stay far away from MFC, there are things out there that surpass it in every...
Forum: C++ Nov 2nd, 2005
Replies: 3
Views: 1,344
Posted By Daishi
I think he meant doing something like:


*sSaverPtr = filled;


Which dereferences whatever sSaverPtr points to, and changes the stored value there to filled.

-Fredric
Forum: C++ Oct 29th, 2005
Replies: 1
Views: 2,331
Posted By Daishi
I don't quite understand what it is you're doing here:


void insert(int array[])
{
int value;

int *frontPtr = array; // referenced both pointers to first element into the...
Forum: C++ Oct 27th, 2005
Replies: 7
Views: 2,038
Posted By Daishi
Well, try all numbers from D to 1,000,000. I was able to write a program that calculates this in under 20 seconds.

BestPi: 3.141592653588651 3126535/995207

I used one loop that went from D...
Forum: C++ Oct 25th, 2005
Replies: 2
Views: 2,961
Posted By Daishi
I managed to get your code to compile and run, but I had to kill it after clicking twice. After looking at your code I noticed that you were trying to draw in the glut mouse function, that's a bad...
Forum: C++ Oct 17th, 2005
Replies: 2
C++
Views: 1,377
Posted By Daishi
A final class? You mean like a final variable in Java? I haven't heard of that before in C++. But to answer your question about making private constructors, the only reason why I could see you...
Forum: C++ Oct 14th, 2005
Replies: 8
Views: 2,639
Posted By Daishi
I didn't see it the first time, but the ^ doesn't do what you think it does in C++, if you want to take m to the n power then you use the pow function like so...


#include <math.h>

...
...
Forum: C++ Oct 14th, 2005
Replies: 8
Views: 2,639
Posted By Daishi
I think you know how to take a factorial of a number, but your variable usage is not good.


while ( z != 0)
{
result *= z;
z--;
}
Forum: C++ Oct 14th, 2005
Replies: 3
Views: 3,273
Posted By Daishi
Isn't std::string the ANSI string?

Why are you not using std::string? If you were you could just do...

result.erase(result.find(' '));

To remove one space...

-Fredric
Forum: C++ Oct 7th, 2005
Replies: 16
Views: 4,710
Posted By Daishi
I assume you have the left side of the christmas tree. What you need is the right side? You just need to print out twice as many stars in that case.

0: *
1: ***
2:*****

-Fredric
Forum: C++ Oct 7th, 2005
Replies: 16
Views: 4,710
Posted By Daishi
Err', sorry, reread your post more carefully..if you want a christmas tree effect, then you need to include that for loop I said to leave out, but set the initial value of i to j in it, change 40 to...
Forum: C++ Oct 6th, 2005
Replies: 16
Views: 4,710
Posted By Daishi
#include <iostream>

using namespace std;

int main()
{
int i, j, lines;

cout << "This Program creates Christmas Trees." << endl;
Forum: C++ Sep 11th, 2005
Replies: 8
Views: 3,836
Posted By Daishi
test.insert(pair<int,int>(a,b));


That works for me..?

-Fredric
Forum: C++ Sep 4th, 2005
Replies: 8
Views: 2,293
Posted By Daishi
How are you printing out the list?

-Fredric
Forum: C++ Sep 3rd, 2005
Replies: 8
Views: 2,293
Posted By Daishi
node* p_before = find_element(number, k_beginning);


What is k_beginning? Is it a node? Is it a number? Is it suppose to be p_beginning?

In any case, that code shouldn't truncate the end of...
Forum: C++ Aug 31st, 2005
Replies: 8
Views: 1,719
Posted By Daishi
Probably a dumb question, but are you sure that those bitmaps are in the right place with respect to the .exe file that you are running?

Here is a link to an faq on gamedev.net that covers DirectX...
Forum: C++ Aug 30th, 2005
Replies: 2
Views: 1,351
Posted By Daishi
http://hjs.geol.uib.no/cplusplus/

Looks like a good place to start.

-Fredric
Forum: C++ Aug 30th, 2005
Replies: 8
Views: 1,719
Posted By Daishi
Woops, I just checked to see if that was right, and apparently you can't specify a dll directory with MVC++ 6.0. Sorry for the bad info!

I have done Direct X stuff before, but what you are saying...
Forum: C++ Aug 29th, 2005
Replies: 8
Views: 1,719
Posted By Daishi
I've heard of problems with MSVC++ 6.0, where everything runs fine when you're just running it from MSVC, but when you go to run it in its release/debug folder it crashes. If the program was a...
Forum: C++ Aug 29th, 2005
Replies: 4
Views: 1,486
Posted By Daishi
...
bool CheckDate( int day1, int month1)
{
int day1, month1 = 0;
...


Two things I see wrong there. First, if you want CheckDate to be a method of class dateReport then you need to add...
Forum: C++ Aug 16th, 2005
Replies: 4
Views: 1,449
Posted By Daishi
I would say that C++ is definitely harder to learn and understand than Java. When you are using C++ it is really easy to forget/misuse a lot of the object oriented methodology. With Java,...
Forum: C++ Aug 16th, 2005
Replies: 2
Views: 1,821
Posted By Daishi
It sounds like you are trying to do something like the following...


Music *music = new Music;

Record *record = (Record *)music;



This is fine and it will compile, but you *never* want...
Showing results 1 to 28 of 28

 


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

©2003 - 2009 DaniWeb® LLC