1,177 Posted Topics

Member Avatar for rtllz

I don't even understand the output you are looking for? Can you make a list of the first 11 numbers you would like to output?

Member Avatar for mrnutty
0
125
Member Avatar for qqwushi12345
Member Avatar for new_programmer
Member Avatar for Allophyl

Rather than delete the thread, you should post what you figured out. This way when someone searches the forum, if they find your question they will also find the answer!

Member Avatar for daviddoria
0
80
Member Avatar for ThrasherK

While this is a pretty short program, I think it would still help to break it down in to functions. Some ideas for functions would be: [code] void GuessLetter(char letter); //the main logic - every user input should trigger this function bool ContainsLetter(string word, char letter); //determine if 'letter' is …

Member Avatar for VernonDozier
0
236
Member Avatar for daviddoria

Dani and community, I saw this thread: [url]http://www.daniweb.com/forums/thread296478.html[/url] and it gave me an idea. With nearly 800,000 members, we should try to leverage the massive talent that has amassed on DaniWeb to collectively do some projects for some worthy causes. For example, the web design/programmers could work together to make …

Member Avatar for Lusiphur
5
246
Member Avatar for mehak gupta

You can start another program using the system() function. As for a GUI, I would suggest Qt4. Dave

Member Avatar for mehak gupta
0
261
Member Avatar for smoothe19

French or not, you're going to have to show us that you have tried. We are not going to do your assignment for you, but we'd be happy to teach you something along the way!

Member Avatar for smoothe19
0
149
Member Avatar for ota1it1iuss

Try to break the problem down into as small of parts as possible. Make a < 20 line program that demonstrates one problem you have having and post it for us. It will be much easier to teach you little bits at a time using this procedure than to simply …

Member Avatar for sfuo
0
2K
Member Avatar for daviddoria

With std::queue I've been using this: [code] std::queue<int>::iterator pos = std::find( q.begin(), q.end(), 5); [/code] But when I try that with std::stack : [code] std::stack<int>::iterator pos = std::find( s.begin(), s.end(), 5); [/code] I get [code] error: ‘iterator’ is not a member of ‘std::stack<int, std::deque<int, std::allocator<int> > >’ [/code] Anyone know …

Member Avatar for AuburnMathTutor
0
5K
Member Avatar for darksmokepunch

I don't understand why current_loc even needs to be a pointer? Why not just have each player have a member object of your location enum? Maybe I missed something?

Member Avatar for darksmokepunch
0
155
Member Avatar for gameon

Unless you are extremely experience I think you should leave this to the experts an use an existing virus scanning software. Dave

Member Avatar for SimonJarvis
0
264
Member Avatar for escortcosworth

What do you mean by "does not work"? What is an example triple of input? The current output? The expected output? I'd recommend making a small demo program to test the functions without any user interaction - that is, hard code three values and see if it gives you the …

Member Avatar for escortcosworth
0
89
Member Avatar for rObOtcOmpute

Please don't delete the question - rather post the answer in a reply so that other people searching the forum can find the solution as well.

Member Avatar for daviddoria
0
86
Member Avatar for qqwushi12345

Please use code tags when posting code. Also, which numbers are not working correctly? You should be as detailed as possible when posting your problems so people here can help you as efficiently as possible. David

Member Avatar for daviddoria
0
169
Member Avatar for punchinello

I use VTK for everything 3D (vtk.org). You ask for c++ and VB in the same sentence though - which would you prefer?

Member Avatar for punchinello
0
1K
Member Avatar for lafayettejohnso

Welcome to DaniWeb! It would really help if you could "abstract" the problem that you are having. That is, try to make a <20 line compilable example that demonstrates the problem. It is much easier for us to teach you something that you can then apply to your large program …

Member Avatar for daviddoria
0
220
Member Avatar for wyssen

My suggestion (same as Mike's) is to convert everything to a CMakeLists.txt file. It will take some initial time, but it will make everything MUCH easier.

Member Avatar for wyssen
0
252
Member Avatar for Grusky

By 2D vectors I think he means [code] std::vector<std::vector<double> >[/code]. Also, is this for an assignment? If not, you should definitely stick with a matrix class that is already made - vnl_matrix from the VXL package or something like that. It will save you lots of headaches. Dave

Member Avatar for r.evrard
0
168
Member Avatar for coding101

try [code] g++ yourfile.cpp [/code] This will produce a binary called a.out. You can also do this to specify the name of the binary file: [code] g++ yourfile.cpp -o nameOfBinary [/code]

Member Avatar for StuXYZ
0
122
Member Avatar for dogwood705

You should read a line at a time and use this: [url]http://programmingexamples.net/index.php?title=CPP/Strings/Split[/url] You should have a Data class and overload the input operator to handle parsing the dates (with the /'s etc)

Member Avatar for dogwood705
0
363
Member Avatar for web3

I got really annoyed with the "low-level-ness" of OpenGL and GLUT. SDL provided what I thought was a much more reasonable level of an interface. It was also nice that you don't have to enter the "glut main loop" so you don't have to change your existing code so much …

Member Avatar for daviddoria
0
271
Member Avatar for +_+man

Can you please clarify? You want to have a prompt such as : "Enter the password: " and then check if the password that is entered is correct? Depending on the security level needed, you could just hardcode the password in the code and do a string comparison. Another common …

Member Avatar for ylin333
0
946
Member Avatar for daviddoria

Currently I am pointing my domain (mydomain.com) somewhere by using this as the index.html: [code] <html> <head> <meta HTTP-EQUIV="REFRESH" content="0; url=http://somewhere.com"> </head> <body> </body> </html> [/code] However, when I go to mydomain.com, it redirects to somewhere.com, but the URL is actually changed to "somewhere.com" in the browser. Is there a …

Member Avatar for diafol
0
58
Member Avatar for Saima_Khan

Search this page: [url]http://en.wikipedia.org/wiki/C%2B%2B[/url] In the future, there is really no need to start 3 threads for these things.

Member Avatar for daviddoria
-1
55
Member Avatar for 060609

First, please use a descriptive title. "Help me" does not qualify! Second, you posted this only 2 hours before. Did you really expect help in that short of time? Most importantly, why would we do your assignment if you don't want to. It looks like you have simply copied and …

Member Avatar for Duki
-3
207
Member Avatar for aukeebler

After you input the Fahrenheit temperature, you immediately call calcCelsius which contains a cin statement. If you type a second number and hit "enter" again it works. It doesn't really make sense to input the Celsius temperature though in calcCelcius, right?

Member Avatar for sfuo
0
128
Member Avatar for CHRISTTY MAE

It is not reasonable to translate a sentence into another language one word at a time. Assuming you want this "bad" translation (word by word), you should split the sentence at the spaces and store the words in a std::vector<std::string> and iterate through the vector to do the translation.

Member Avatar for daviddoria
0
91
Member Avatar for mikenable

The problem is that in this line: TicTacToe game(char X, char E); You cannot have the type again - it needs to be: TicTacToe game(X, E); However, now you will get a "X is not declared" error. You either need to make X public and use game.X or do something …

Member Avatar for mike_2000_17
0
294
Member Avatar for Duplaix

Welcome to DaniWeb! You won't likely get any help here unless you show us that you have given it a good try yourself first. Post some code that you have come up with and explain the input, current output, and expected output along with any compiler errors or crashes and …

Member Avatar for mrnutty
0
148
Member Avatar for StefanTUE

I think you could use the min histogram value from this function: [url]http://opencv.willowgarage.com/documentation/python/histograms.html#getminmaxhistvalue[/url] ? That kind of seems silly, but I don't see any obvious easier "ImageMinValue" type of type of function that they provide.

Member Avatar for StefanTUE
1
220
Member Avatar for +_+man

You could certainly do what firstPerson has suggested. Or you could just generate independent random numbers: [url]http://programmingexamples.net/index.php?title=CPP/RandomNumbers[/url]

Member Avatar for daviddoria
0
100
Member Avatar for c++learner

Take a look at this: [url]http://programmingexamples.net/index.php?title=CPP/Strings/CountCharacters[/url] Dave

Member Avatar for c++learner
0
184
Member Avatar for AamirH

'' is typically called an "escape sequence". If you are actually trying to search for a '', you need to use a '\'. Can you explain an input that is giving you an incorrect behavior?

Member Avatar for mike_2000_17
0
108
Member Avatar for katokato

I'm not exactly sure what the problem is. Does it crash? Or what is the input, current output, and expected output? Dave

Member Avatar for katokato
0
106
Member Avatar for pepemongo13

Please use code tags when you post code. Also, DaniWeb has a "Looking to Hire" forum that you should post something like this "willing to pay..." post in. Dave

Member Avatar for Fbody
0
461
Member Avatar for kiLLeR-eyEd_14

Please try to simplify your problem down to a < 20 line piece of code. Then also explain the problem in much more detail. You'll find that it is highly likely that no one will help you in the current form that you have posed your question. Dave

Member Avatar for kiLLeR-eyEd_14
-2
96
Member Avatar for help1

Welcome to DaniWeb. Please refrain from typing in all caps. You can install any linux distribution on any computer and you will have the g++ compiler to compile and test your code. Dave

Member Avatar for daviddoria
-2
87
Member Avatar for angel_banned

Is there any reason why it must be done in c++? I'm also assuming he is using Microsoft Windows? Dave

Member Avatar for jonsca
0
293
Member Avatar for wwefriend
Member Avatar for daviddoria
0
94
Member Avatar for jeffpro

jeffpro, Welcome to DaniWeb! SetCursorPos() seems reasonable, too bad you can't use it! Which operating system are you using? That is definitely going to dictate how you need to go about this. Dave

Member Avatar for mitrmkar
0
101
Member Avatar for enkidu75

Welcome to DaniWeb! Please use code tags when posting code. It makes it much more readable for us. The first step would be to convert to lowercase. You can use this method: [url]http://programmingexamples.net/index.php?title=CPP/Strings/Case_Conversion[/url] Then take a look at this example. It shows how to count the occurrences of a character: …

Member Avatar for Ancient Dragon
0
342
Member Avatar for Dani

Here are a couple of things: 1) If you want to be a bit adventurous, I've heard of the concept of "labeling" threads (as gmail does) rather than putting them in subforums (folders, following the gmail vs traditional email example). I noticed your thread discussing how you re-arranged some subforums …

Member Avatar for daviddoria
0
483
Member Avatar for intelfx

If the lists are small, I would copy each of them into an std::multiset. The set will be sorted automatically. You can then compare each element of the sets. If they all match, the original string you have are equal. Maybe someone has a better (more efficient) idea for you? …

Member Avatar for intelfx
0
3K
Member Avatar for duuude

Hi duude, Welcome to DaniWeb! It may be painful to install and get working the first time, but Boost has a timer: [url]http://programmingexamples.net/index.php?title=CPP/Boost/Timer[/url] Good luck, Dave

Member Avatar for jonsca
0
208
Member Avatar for Member 784183

Hi Coronax, Welcome to DaniWeb! Even though you are coding in c++, this is not really a c++ question. I would check with a math-y forum such as mathoverflow.net, the Mathworks forum, or physicsforum.com to see if you can get a good explanation. Good luck! Dave

Member Avatar for Member 784183
1
227
Member Avatar for happygeek

The dinner was great! It's always interesting to have conversations with people from such varying backgrounds. The pictures look great, too! What was the deal with the glasses with no lenses? I saw Dani had them on for a while, then they disappeared. Unfortunately I couldn't stick around for much …

Member Avatar for WolfPack
0
641
Member Avatar for hotness

Can you explain the problem that you are having? If you have a specific problem, if you could trim the code down to < 20 compliable lines that demonstrates the problem, that would me much easier for us to look at than just dumping 200 lines on us! Dave

Member Avatar for hotness
0
78
Member Avatar for dumb-one

You should definitely use a std::vector<int> to store these things. You could also then define an enum to contain the name of the years to access the correct element of the vector JANUARY = 0, etc Good luck, Dave

Member Avatar for dumb-one
0
352
Member Avatar for CodeAerial

That is really a better a question for here: [url]http://sourceforge.net/projects/notepad-plus/forums[/url] Dave

Member Avatar for Ancient Dragon
0
82

The End.