Search Results

Showing results 1 to 40 of 628
Search took 0.04 seconds.
Search: Posts Made By: daviddoria
Forum: C++ 1 Day Ago
Replies: 1
Views: 97
Posted By daviddoria
Say you have a class that has members

private:
double a,b,c,d,e,f,g,h,i;


You can make an accessor like:

double operator[](int index)
{
Forum: C++ 11 Days Ago
Replies: 4
Views: 139
Posted By daviddoria
Jas, but won't it still crash evaluating the second part of the conditional?

Dave
Forum: C++ 11 Days Ago
Replies: 4
Views: 139
Posted By daviddoria
If I have the following setup:



Point* MyPoint = Object->GetMyPoint();

if(MyPoint->GetValue() != 2)
do something;
else
do something else;
Forum: C++ 15 Days Ago
Replies: 4
Views: 180
Posted By daviddoria
From that algorithm you gave I don't understand how you are supposed to get more than one factor?

Maybe this will be a good starting point for you - it just gets the smallest factor (besides 1)...
Forum: C++ 15 Days Ago
Replies: 3
Views: 156
Posted By daviddoria
Is this what you are looking for?


#include <iostream>
#include <string>

int main()
{
const char NONWORD[] = "\n";
Forum: C++ 15 Days Ago
Replies: 6
Solved: Triangle.
Views: 195
Posted By daviddoria
Here you have declared the variables, but then output just constant expressions...

I'd suggest googling for "basic c++" and trying some of the simple examples you find until you get familiar with...
Forum: C++ 15 Days Ago
Replies: 3
Views: 156
Posted By daviddoria
I don't understand why you would want to remove stl features? They make things MUCH easier...
Forum: C++ 15 Days Ago
Replies: 4
Views: 180
Posted By daviddoria
You need to give us more of a feeling that you have really tried. Did your code produce errors? Or incorrect results? Why don't you try some simple cases like the number '4'. You should expect to see...
Forum: C++ 15 Days Ago
Replies: 3
Views: 94
Posted By daviddoria
First of all, you should #include <iostream> instead of #include <iostream.h>. This is the "new" c++ way to do it.

Second, you have to #include <cstring> to use strcpy.

Third, you have not...
Forum: C++ 15 Days Ago
Replies: 2
Views: 126
Posted By daviddoria
I don't understand the problem...

int NumberOfPositiveRoots(root1, root2)
{
int counter = 0;
if (root1 >= 0)
{
counter++;
}
if (root2 >= 0)
Forum: C++ 15 Days Ago
Replies: 6
Solved: Triangle.
Views: 195
Posted By daviddoria
What you have there is simply a hard coded triangle. You need to write the code to setup the triangle's height and width. Give it a shot and post your problem once you try it.
Forum: C++ 27 Days Ago
Replies: 5
Views: 151
Posted By daviddoria
Please explain exactly what you need. What operating system are you using?
Forum: Windows Software 30 Days Ago
Replies: 0
Views: 212
Posted By daviddoria
Is there a "correct" way to draw a line betwee the header and body of a document in word 2007? I've been using a Shapes->Lines line, but it seems silly because there is no way to center it, etc.
...
Forum: C++ Oct 17th, 2009
Replies: 3
Views: 240
Posted By daviddoria
I had to instantiate the constructor by adding this to the instances.inc file:

template Graph<int,int,int>::Graph(int, int, void (*)(char *));


Does anyone understand why / know if the...
Forum: C++ Oct 16th, 2009
Replies: 3
Views: 240
Posted By daviddoria
With this code:
http://www.rpi.edu/~doriad/Daniweb/maxflow/
If I run

g++ Example.cpp graph.cpp


with g++ 3.3, everything works fine. However if I run the same command with g++ 4.4, I get...
Forum: Windows NT / 2000 / XP Oct 14th, 2009
Replies: 3
Views: 299
Posted By daviddoria
caperjack - that removes the big calendar button, but it doesn't remove calendar from the "Favorite Folders" list.
Forum: Windows NT / 2000 / XP Oct 14th, 2009
Replies: 3
Views: 299
Posted By daviddoria
With normal folders, you can right click them and say "Remove from favorite folders, as per here: http://office.microsoft.com/en-us/outlook/HA011176721033.aspx

However, Calendar and Contacts don't...
Forum: C++ Oct 12th, 2009
Replies: 11
Views: 327
Posted By daviddoria
Interesting - can anyone else confirm?
I am using:
gcc version 4.4.1 20090725 (Red Hat 4.4.1-2) (GCC)
Forum: C++ Oct 12th, 2009
Replies: 4
Views: 195
Posted By daviddoria
Hm I tried that - didn't seem to work. Here is a super simplified version that produces the same error:

http://www.rpi.edu/~doriad/Daniweb/octree/

I still think the problem is simply that they...
Forum: C++ Oct 12th, 2009
Replies: 11
Views: 327
Posted By daviddoria
I'm still getting the same error. Can someone try these files:
http://www.rpi.edu/~doriad/Daniweb/maxflow/

with

g++ Example.cpp graph.cpp
Forum: C++ Oct 12th, 2009
Replies: 11
Views: 327
Posted By daviddoria
I dont think so ...
The constructor is actually:

Graph(int node_num_max, int edge_num_max, void (*err_function)(char *) = NULL);


which is an optional parameter, no? Hence it should be fine...
Forum: C++ Oct 12th, 2009
Replies: 11
Views: 327
Posted By daviddoria
I am doing that:

[doriad@davedesktop test]$ g++ Example.cpp graph.cpp
/tmp/ccHbyqCi.o: In function `main':
Example.cpp:(.text+0x38): undefined reference to `Graph<int, int, int>::Graph(int, int,...
Forum: C++ Oct 12th, 2009
Replies: 4
Views: 195
Posted By daviddoria
Any ideas?
Forum: C++ Oct 12th, 2009
Replies: 11
Views: 327
Posted By daviddoria
Does any one have any clues for me?

Dave
Forum: Windows Software Oct 11th, 2009
Replies: 2
Views: 345
Posted By daviddoria
Ah great - I never knew about that!
Forum: HTML and CSS Oct 11th, 2009
Replies: 5
Views: 343
Posted By daviddoria
Great - I guess the problem was mostly with what was contained inside the content-wrap. I didn't end up "clearing" any of the div's, but it seems to be working fine.

Thanks!
Forum: HTML and CSS Oct 11th, 2009
Replies: 7
Views: 440
Posted By daviddoria
perfect - thanks!
Forum: HTML and CSS Oct 10th, 2009
Replies: 7
Views: 440
Posted By daviddoria
I agree about the layout. However if I let the page expand to the screen width then the images specified in pixels will look too big/small unless the resolution is the same as my design resolution,...
Forum: HTML and CSS Oct 9th, 2009
Replies: 7
Views: 440
Posted By daviddoria
Is there anyway to get images to be the "correct" size - i.e. fit the width of the text?

This is what currently happens:
http://engineeringnotes.net/personal/pictures.shtml

Thanks,

Dave
Forum: HTML and CSS Oct 9th, 2009
Replies: 5
Views: 343
Posted By daviddoria
I see, thanks. However, I have most of the code in a header.shtml file so I can do this:

<div id="wrap">
<!--#include file="header.shtml" -->
<div id="main">
Home page
</div>...
Forum: HTML and CSS Oct 9th, 2009
Replies: 5
Views: 343
Posted By daviddoria
I'm still very new to css, so I'm sure this is just some really silly thing:
http://engineeringnotes.net/personal/

Does anyone know why the text is hanging off the left side of the page (on the...
Forum: Windows Software Oct 9th, 2009
Replies: 2
Views: 345
Posted By daviddoria
I have a folder A with files 001.jpg, 002.jpg, etc
I also have a folder B with different files but with the same names; 001.jpg, 002.jpg, etc

I want to put all the files in the same directory -...
Forum: C++ Oct 9th, 2009
Replies: 4
Views: 195
Posted By daviddoria
I am looking at some open source code and I am a bit confused. There is an Allocator class:

class Allocator{


Then in another class, they have:

class Octree{
public:
static...
Forum: C++ Oct 9th, 2009
Replies: 11
Views: 327
Posted By daviddoria
Here is a simplified version that produces the error:

graph.h

#include <string.h>


template <typename captype, typename tcaptype, typename flowtype> class Graph

{
Forum: C++ Oct 8th, 2009
Replies: 11
Views: 327
Posted By daviddoria
I am trying to compile some code (Example.cpp from here: http://www.rpi.edu/~doriad/Daniweb/maxflow/). I am getting


Example.cpp:(.text+0x38): undefined reference to `Graph<int, int,...
Forum: C++ Sep 20th, 2009
Replies: 6
Views: 580
Posted By daviddoria
Please show us the code that you've come up with so far and we can help guide you.
Forum: C++ Sep 18th, 2009
Replies: 8
Views: 337
Posted By daviddoria
The thing is, I didn't change anything except the debugger and all is well, so I don't think the this pointer could be invalid and it work now?

I have to use the this pointer because of this:...
Forum: C++ Sep 18th, 2009
Replies: 8
Views: 337
Posted By daviddoria
Here is the next line:

std::set<unsigned int>::iterator it;
it = this->SubmeshVertexSet.find(MeshOriginIndex);


SubmeshVertexSet is a member variable:

private:
std::set<unsigned int>...
Forum: C++ Sep 17th, 2009
Replies: 8
Views: 337
Posted By daviddoria
I guess it was a gdb bug? I compiled the latest svn and it gets past that line now with no problems.
Forum: C++ Sep 17th, 2009
Replies: 8
Views: 337
Posted By daviddoria
Unfortunately this is embedded way way way in a huge project. I was trying to see if anyone could offer an "of course I can't be sure, but you could try XYZ".

Dave
Showing results 1 to 40 of 628

 


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

©2003 - 2009 DaniWeb® LLC