1,177 Posted Topics

Member Avatar for aleX_X

You're really going to have to narrow down the problem/make it much more explicit. Some recommended reading: [url]http://daviddoria.blogspot.com/2010/05/problem-abstraction-helping-others-help.html[/url] Dave

Member Avatar for NathanOliver
0
228
Member Avatar for ercdill

You'll have to show us the printToFile function. I also recommend [code] if ( c >= 12) { x[i].printToFile(outFile1); std::cout << "File1" << std::endl; } else { x[i].printToFile(outFile2); std::cout << "File2" << std::endl; } [/code] to make sure the conditional is triggered correctly. Dave

Member Avatar for daviddoria
0
157
Member Avatar for timb89

Do you have a matrix class? If not, I'd recommend vnl_matrix from VNL (part of VXL). You can then just do: [code] yourMatrix(r1,c1) = float1 [/code] Dave

Member Avatar for mrnutty
0
306
Member Avatar for aleX_X

Here are a handful of explanations and possible solutions: [url]http://www.daniweb.com/forums/thread114299.html[/url]

Member Avatar for daviddoria
0
430
Member Avatar for daviddoria

I have some white text I am putting over a very light background. Is there anyway to outline the text in black? After some googling it looks like there are some pretty complicated solutions, but I am looking for something like a check box that says "outline". Is there such …

Member Avatar for daviddoria
0
1K
Member Avatar for daviddoria

I set the .Interval of a timer to "10", which I believe means 10 milliseconds. Since there are 1000 ms in 1 second, if I count to 100, I should have 1 second, right? The problem is, if I use a physical stop watch and compare it to my program, …

Member Avatar for kvprajapati
0
271
Member Avatar for noobday

I imagine the problem is how you are actually compiling it. You need to compile both countertest.cpp as well as counter.cpp. My guess is that you are only compiling countertest.cpp. Dave

Member Avatar for daviddoria
0
153
Member Avatar for Sargam541
Member Avatar for edbirdmann

Well the first major problem is that you are not passing the variables by reference to GetScore, so they aren't going to be available when you leave it!

Member Avatar for schoenfelder.p
-1
459
Member Avatar for donny008

I'd suggest using a library for image processing such as VTK, OpenCV, or VIL (part of VXL). Dave

Member Avatar for daviddoria
0
60
Member Avatar for roneh96
Member Avatar for mane.ashwini
Member Avatar for atmc

First, please use real English words (i.e. not "dis"). Second, I would keep track of the number in a separate counter that is incremented manually in the inner loop rather than trying to increment j and m in the loop definition. Give that a try and see if it helps. …

Member Avatar for daviddoria
0
77
Member Avatar for KUMAR_2010

Here's the deal - I'll spend as much time helping you as you have spent trying yourself! Ok, I'm done!

Member Avatar for daviddoria
-1
32
Member Avatar for Dewey1040

Since this is a non-native c++ thing, I would recommend using system() to call the appropriate system command to get the terminal size (I don't know what it is, but I'm sure one exists). Include in the command writing this result to a file. Then read the file in your …

Member Avatar for Dewey1040
0
298
Member Avatar for bablo

vtkPNGReader is able to read alpha values: [url]http://www.vtk.org/doc/nightly/html/classvtkPNGReader.html[/url]

Member Avatar for daviddoria
0
43
Member Avatar for goulda660

Please try to replicate the problem in as few lines as possible - I'm guessing you can start paring down the code and get it to < 20 lines to produce the same problem. This process will probably magically point out the problem! If it doesn't, then we'd be happy …

Member Avatar for goulda660
0
212
Member Avatar for umairch
Member Avatar for daviddoria
-7
55
Member Avatar for vthokie11

I don't think it makes sense to use [icode]<<[/icode] on an ifstream. I think you should look into the getline() function. You shouldn't have to overload the >> operator to do this. Dave

Member Avatar for daviddoria
0
141
Member Avatar for nola_Coder

This might go better in the Game Development subforum: [url]http://www.daniweb.com/forums/forum71.html[/url] Dave

Member Avatar for daviddoria
0
94
Member Avatar for new2programming

I didn't look at the code - but maybe you want to make an [icode]std::vector<Player>[/icode] ? Dave

Member Avatar for daviddoria
0
73
Member Avatar for new2programming
Re: Maps

I think this would go better in the Game Development subforum: [url]http://www.daniweb.com/forums/forum71.html[/url] Dave

Member Avatar for daviddoria
0
73
Member Avatar for coding101

1) please use code tags 2) is this for an assignment (i.e. are you wanting help writing the sort?)? If not, then look at the STL algorithm sorting functions: [url]http://www.cplusplus.com/reference/algorithm/[/url] [url]http://www.cplusplus.com/reference/algorithm/sort/[/url] Dave

Member Avatar for WaltP
0
155
Member Avatar for numbawang

1) Please make your titles informative - "Gaussian elimination" is much more informative than "Help. Gr11 array chap project" 2) This should get you started [url]http://en.wikipedia.org/wiki/Gaussian_elimination#Algorithm_overview[/url] Dave

Member Avatar for daviddoria
-1
124
Member Avatar for c++lover
Re: hi,

abdulsaboor30 - please use code tags and do not do peoples assignments for them!

Member Avatar for daviddoria
0
128
Member Avatar for anuragcoder

This may be partially my fault - I told him to start this thread because the discussion in a previous thread now had nothing to do with the title.

Member Avatar for daviddoria
0
116
Member Avatar for anuragcoder

Please be much more specific. You want to color words in a terminal? Or are you using a GUI?

Member Avatar for anuragcoder
-2
85
Member Avatar for anuragcoder

'outfile' doesn't seem to be defined. This code works fine for me: [code] #include <iostream> using namespace std; int main() { string text; int nl = 0; cout<<"Press enter twice in a row to quit: "; while (nl < 2 && getline(cin, text)) { if (text.empty()) { ++nl; } cout …

Member Avatar for daviddoria
0
107
Member Avatar for ziwacha

No one is going to help you unless you have tried it yourself first!

Member Avatar for joker400
-4
60
Member Avatar for foco

It looks like a good way is to direct the results of the command to a file and then read the file in c++: [url]http://www.cplusplus.com/forum/general/1253/[/url]

Member Avatar for daviddoria
0
55
Member Avatar for daviddoria

Some of you may have noticed that I am always harping about "abstracting the problem" and "posting the smallest compilable piece of code that demonstrates a problem." I rambled a bit about why this is important if anyone cares to read: [url]http://daviddoria.blogspot.com/2010/05/problem-abstraction-helping-others-help.html[/url] Dave

Member Avatar for Ketsuekiame
0
90
Member Avatar for weaponx69

Try to cut out code until it is short enough to post here using code tags (< 30 lines). That will help you find the problem, as well as help us fix it if you can't.

Member Avatar for weaponx69
0
125
Member Avatar for ARKaMAN

What language is this? Please try to abstract your problem - if you need help with a loop, then write a simple loop and show us where the problem is. "How do I give a player weapons?" is not a c++ question. "How do I loop over an array?" is …

Member Avatar for Ketsuekiame
0
192
Member Avatar for daviddoria

When I click the "Unanswered" tab to see all of the posts that have 0 replies, I get a page of threads that indeed have 0 replies. When I click on the "2" (for page 2) or the "next" button at the bottom to go to the next page of …

Member Avatar for Dani
0
44
Member Avatar for new2programming

Here is how to do it with VTK: [url]http://www.vtk.org/Wiki/VTK/Examples/Images/BackgroundImage[/url] Dave

Member Avatar for daviddoria
0
81
Member Avatar for D4n1sD
Member Avatar for moonL!ght

Sounds like you need to make a "Fraction" class and then make an array (I'd recommend a std::vector) of Fraction objects. [code] std::vector<Fraction> fractions; [/code] I hope this gets you started - once you get some code written post it here and I'm sure someone can help you with any …

Member Avatar for moonL!ght
0
254
Member Avatar for GlaDiuS89

I always recommend trying to abstract the problem. Here, your problem has nothing to do with translation. You simply want to know "How do I display a string in a text box?", right? Unfortunately I don't do any windows gui programming, but surely someone can help if you post a …

Member Avatar for daviddoria
0
449
Member Avatar for J_A_L

Please use code tags to post the smallest compilable example of the problem. Subscript out of range means you are doing something like [icode] myArray[5][/icode] when the array only has 3 elements, or something like that. Dave

Member Avatar for J_A_L
0
152
Member Avatar for ilikewii
Member Avatar for corby

Please use code tags to post the relevant parts of the code - no one wants to look through 10 files! Dave

Member Avatar for corby
0
126
Member Avatar for jalpan

I'd suggest using a library that can deal with images. For example, VIL (part of VXL) or VTK (vtk.org). Dave

Member Avatar for LevyDee
0
91
Member Avatar for misvampire

Please boil your question down to a 20 line, compilable piece of code that we can help you with. If you don't want to do your homework, why would we?? Dave

Member Avatar for ndeniche
0
205
Member Avatar for superchica08

You're going to have to show some effort before anyone is going to help you with your project. Have you written any code so far? I'm not sure how they're expecting you to know the form/shape of the letters - do you have any additional input files? (b/w images of …

Member Avatar for superchica08
-1
919
Member Avatar for ziyakhan10

This does not look like standard/modern c++. You should [icode]#include <iostream>[/icode] instead of [icode]#include<iostream.h>[/icode] Then you should do the reading with the >> ifstream operator instead of .read and the << ofstream operator instead of .write. Dave

Member Avatar for ziyakhan10
0
193
Member Avatar for ejohns85

You should look for the opencv forum (maybe it is a google group, I forget exactly). This is not a c++ question so you probably won't find much help here :(

Member Avatar for daviddoria
0
158
Member Avatar for anollipian

I would use VTK - it is basically a wrapper around openGL that allows you to do things much more easily. For either OpenGL or VTK, there is a pretty extreme learning curve - shouldn't you be learning something like this in your class???

Member Avatar for daviddoria
0
78
Member Avatar for nerak19

Is this for a course or for real use? If you intend to actually use the code - I would highly recommend going with an already developed mathematical toolkit for c++, such as VNL (part of VXL). It will most definitely be very optimized an provide all of the functionalities …

Member Avatar for nezachem
0
135
Member Avatar for braineater

1) Please use code tags 2) Please use a reasonable indention scheme for your braces (maybe not using code tags affected this?) 3) Try to narrow down your question to the smallest piece of code possible. Maybe make a 10 line example that fills a vector and then ask "how …

Member Avatar for daviddoria
-2
153
Member Avatar for odonal01

First, please use code tags. Instead of writing a "header", I think you mean you need to write the "class" called extRoman. at the very least you have a bunch of operator overloading to do (--, ++, +, <<, *). Sounds like you'll also need some functions for averages etc. …

Member Avatar for daviddoria
-1
163

The End.