202 Posted Topics

Member Avatar for printmatic

I believe your problem is in the while loop exit condition. I think are only exiting the loop if there is a '#' found; otherwise the loop continues and x is incremented. Try adding a condition to check if x has exceeded the length of the string. Perhaps something like …

Member Avatar for kramerd
0
273
Member Avatar for dmanw100

Hello all, I have created an RSS object and I would now like to parse out the descriptions of the children. My knowledge of RSS is extremely limited so pardon me if I am incorrect in explaining what I need. For example, I am connecting to [url]http://rss.cnn.com/rss/cnn_topstories.rss[/url] and I would …

Member Avatar for dmanw100
0
202
Member Avatar for peekamalts

Your explanation is very thorough. If you want to read more about the concepts you could try [url]http://en.wikipedia.org/wiki/Object-oriented_programming[/url].

Member Avatar for jasvir
-1
335
Member Avatar for dmanw100

Hello, I was just wondering if the hlt instruction would produce a blinking cursor at the command line until enter is pressed or if its use is not noticeable to the user. Google wasn't too helpful for the specifics of the instruction. Thanks!

Member Avatar for NotNull
0
192
Member Avatar for preet4fun

Your 4% interest should probably use a variance of the I = Prt equation where I is interest, P is principle, r is rate, and t is time. solving that for rate when you know that I will by .04P should give you a more accurate rate per month. Make …

Member Avatar for puranchandra248
0
2K
Member Avatar for dmanw100

Hello, I am writing a method which must open a file, read its contents, close the file, open it later, write to the file, and close it again. The method is failing at the first step and throwing an IOException when trying to execute: [CODE]FileInput Stream fileHandler = new FileInputStream("myfile.fil");[/CODE] …

Member Avatar for dmanw100
0
152
Member Avatar for dmanw100

Hello, I am having problems using an ObjectInputStream to read from a file. My program uses a File to check whether or not a specific file exists. If it exists my program will attempt to create a FileInputStream for the file and associate an ObjectInputStream with it. It should first …

Member Avatar for dmanw100
0
121
Member Avatar for dmanw100

Hello, I am trying to do something very simple but my dial up connection is making it hard to research so I'd like some help! I'm trying to store instances of classes I created in a file. Something along these lines: [CODE] class apple { int flavor; String color; apple(int …

Member Avatar for dmanw100
0
111
Member Avatar for f.ben.isaac

Where would a good place be to learn more about multithreading? I don't think there is much at [url]www.cpluplus.com[/url]. Any suggestions on libraries/tutorials? Thanks!

Member Avatar for Clockowl
0
151
Member Avatar for dmanw100

Hello, I'm pretty new to PHP and MySQL. I was wondering what the most efficient way to access a large database would be. All the tutorials I've seen show something along the lines of: [icode]$database = mysql_query("SELECT * FROM table");[/icode] But it seems to me that if 'table' was a …

Member Avatar for theighost
0
128
Member Avatar for dmanw100

Hello, I was wondering if there's a way to use the meta tag to go back. I know you can refresh to a new page but I would like to have the user go back instead. Is this possible? Thanks!

Member Avatar for dmanw100
0
143
Member Avatar for dmanw100

Hello, I am very new to PHP and have been working with it now for about a month. My site uses a script to process a POST and generates a new page. The page it generates is saved with the same name as a blank html file on the server. …

Member Avatar for cwarn23
0
267
Member Avatar for Acis

Start by looking at the fstream library. It will let you write files to disk. It also allows reading from disk.

Member Avatar for dmanw100
0
94
Member Avatar for dmanw100

Hello, I am just starting to work with CSS and wondered if there was a good way to make boxes. I found this [URL="http://modxcms.com/simple-rounded-corner-css-boxes.html"]tutorial[/URL] but there are also a number of other ways I have found through Google. What method is the most standard/best? Thanks!

Member Avatar for jakx12
0
120
Member Avatar for dmanw100

Hello, I am new to php and enjoy the fact that it is very similar to languages that I'm much stronger with (mainly C++ and Java). While working through the w3 school's tutorials I noticed a foreach() loop. What loop in C++/Java would this be similar to? It seems like …

Member Avatar for Stefano Mtangoo
0
190
Member Avatar for halfnode

You need to put the return 0; at the end of your main() function. The padBlanks() function will return the string.

Member Avatar for ArkM
1
199
Member Avatar for shasha821110

Since you assign the value in "a" to "b" you effectively lose the address of the char [] pointed to by "b." You can delete the value pointed to by "b," which will be the same char [] pointed to by "a," but you cannot access the other char [] …

Member Avatar for verruckt24
0
146
Member Avatar for ooyellowchicoo

Idk for sure I didn't try this but there is a function button1_click(). Perhaps that is where the action for the click should go. Sorry but I don't have a compiler right now to check that with.

Member Avatar for dmanw100
0
112
Member Avatar for dmanw100

Hello, I am working on a project that requires a set of points to be sorted by their angles in relation to the x-axis. The angles, which are in radians, store their angle as a double value. My insertion sort algorithm is failing to properly sort the points based on …

Member Avatar for dmanw100
0
103
Member Avatar for dmanw100

Hello! I'm just learning JavaScript and I was wondering if clients can view external JavaScript files? I would like to (potentially) use JavaScript to validate passwords to log into my site. Would this work/ is there a better way?

Member Avatar for almostbob
0
149
Member Avatar for appy33

If you compile it and it won't run maybe try adding system("PAUSE"); at the end of your code (right before return 0;). This will only work on Windows and isn't portable.

Member Avatar for Freaky_Chris
0
201
Member Avatar for dmanw100

I'm having a pretty weird logic error. It seems that this code is always ending my arrays with 3. It should (being a recursive function) iterate through 0, 1, 2, 3. My test array is of length 4 but I am completely missing the reason. Can anyone else see the …

Member Avatar for dmanw100
0
145
Member Avatar for dmanw100

I'm a computer science major with a background in C++, not Java. My professor told the class that the Scanner class has a nextInt(), nextDouble(), nextFloat(), etc for every primative type. But whenever I try to use nextChar(), the compiler gives me an "undefined symbol" error. That means that there …

Member Avatar for stephen84s
0
377
Member Avatar for Cyberbanana1

You should be able to download the graphics.h library or perhaps copy it from your school's compiler and install it in your home machine.

Member Avatar for dmanw100
0
84
Member Avatar for dmanw100

I tried Googling this to no avail: how can I request the used space/ total size of the hard drive? In this case it is safe to assume that the machine will be running Windows.

Member Avatar for dmanw100
0
95
Member Avatar for dmanw100

I always wondered if it is possible in Windows to read in general file information (size, created date, modified date, etc) and then modify that data? If it's possible, how can it be done?

Member Avatar for low_coder
0
138
Member Avatar for mybluehair

No he means try system("path\to\file\updater.exe"); This would work if your update program is packaged separately from your actual executable and if you're planning to only distribute on Windows.

Member Avatar for dmanw100
0
84
Member Avatar for dmanw100

I was trying to find ways to improve the loading time of an application that I'm working on. It uses SDL to handle graphics and sound which brought up a question: which takes longer to load? If I want to load either graphics or sound into memory during the application …

Member Avatar for MosaicFuneral
0
82
Member Avatar for Dannielf

I just quickly glanced at your code so please forgive me if this is wrong but don't you initialize the game[] with the values {1,2,3,4,5,6,7,8,9} but then to tell if there is a move there you compare the value at an index with 0? If none of the values equal …

Member Avatar for Lerner
0
116
Member Avatar for mrnutty

Why not use numbers (1-13) and convert 1, 11, 12, 13 to Ace, Jack, Queen, King when you output?

Member Avatar for dmanw100
0
136
Member Avatar for ACRobison02
Member Avatar for glecymay

If you are reading in the source code for a C++ program use the [URL="http://www.cplusplus.com/reference/iostream/iostream/"]iostream[/URL] library. If you're trying to read in a .exe file idk...

Member Avatar for dmanw100
0
61
Member Avatar for dmanw100

I'm working on a project for school where we have to read from a voters database which is set up in the following manner: voternumber:voternama:havevoted Ex: 1253:Bill Simmons:false 3244:Steve Jobs:true I made this algorithm to search for a voter by ID number but for some reason it keeps coming up …

Member Avatar for javaAddict
0
103
Member Avatar for zothos

What kind of factorial is this? An input of 3 will result in an output of 6... it should be 3 * 1. If you enter 4 you will get something like 24. Factorials break numbers down like this: 12 factorial = 2 * 2 * 3. To implement a …

Member Avatar for MosaicFuneral
0
294
Member Avatar for dmanw100

I am having problems reading in from a file in my project. I have a text file from which I need to read in data for creating some objects. I do not know how much data is in the file but I know the format is 6 lines of string, …

Member Avatar for BestJewSinceJC
0
121
Member Avatar for dmanw100

Is there an easy way to open an fstream using a string? My code is as follows: [CODE]bool openArray(std::string *arrayFileName, int *width, int *height,int *myArray) { std::fstream BoardFile; BoardFile.open(*arrayFileName);[/CODE] I obviously cannot use this method since *arrayFileName is not char* but is there another way to do it?

Member Avatar for kux
0
147
Member Avatar for dmanw100

This code is giving me the error "expected primary-expression before ']' token." After googling and looking around Daniweb I still cannot find what this means. Can anyone enlighten me? [CODE]int board[*width][*height]; if(OpenBoard(boardName, width, height, board[][*height])) { } //... //function definition... bool OpenBoard(std::string *boardFileName, int *width, int *height, int board[][100])[/CODE]

Member Avatar for dmanw100
0
243
Member Avatar for dmanw100

Hello, I am trying to pass a multidimensional array to a function but I keep getting a "expected primary-expression before ']' token" error. I'm using Dev-Cpp and here's my code: [CODE]int array[*width][*height]; if(OpenArray(arrayName, width, height, array[][*height]))[/CODE] I suppose it could be because there is nothing actually stored in the array? …

Member Avatar for Salem
0
86
Member Avatar for piggysmile

Hint: you could start by counting pennies and then count 5's with pennies (for nickels) and then 10's with pennies, then 15's etc. There is a pattern to how you can make change in otherwords haha

Member Avatar for ArkM
0
91
Member Avatar for akira_shinizaki

Try posting an attempt. You may want to store the input in an array and then sum the elements of the array with a loop. counting the numbers will be the next step. Post the sumation code first.

Member Avatar for VernonDozier
0
94
Member Avatar for massivefermion
Member Avatar for Alex Edwards
0
136
Member Avatar for panpanf

You might want to check out [URL="http://www.openwatcom.org/index.php/Main_Page"]this[/URL].

Member Avatar for dmanw100
0
236
Member Avatar for AutoC

For the beep I guess you could use an escape character. cout<<"\a"; will give you a beep... sorry I'm not into audio at all.

Member Avatar for dmanw100
0
42
Member Avatar for dmanw100

I am writing a program using strings to pass messages into SDL functions. For some reason the compiler will not let me create any string objects though. I get a 'string' undeclared error when I try to compile this code: [CODE]#include "SDL/SDL.h" #include "SDL/SDL_ttf.h" #include <string> int errorMessage(int errorNumber) { …

Member Avatar for dmanw100
0
156
Member Avatar for tatainti55

You need to seed the random number generator to make it generate a true random number. Try [CODE]#include <ctime> .... srand((unsigned)time(0));[/CODE] As for not having enought money you may want to try putting "break" statements at the end of your switch cases... but I forget

Member Avatar for tatainti55
0
175
Member Avatar for unbeatable0

If you want to switch to Java it supports the Big Int class... but there is nothing bigger that I know of in C++.

Member Avatar for dmanw100
0
130
Member Avatar for gregorynoob

Find a point that is as far in as the length of the height (assuming height < width). Then you have a square and a new rectangle. Repeat the procedure using the shortest side as the side of the new square you want to cut. Do this until S1 == …

Member Avatar for dmanw100
0
149
Member Avatar for dmanw100

I am trying to build a project to learn the SDL libraries but Im getting these errors: [Linker error] undefined reference to `SDL_RWFromFile' [Linker error] undefined reference to `SDL_LoadBMP_RW' [Linker error] undefined reference to `SDL_DisplayFormat' ... I am including "SDL\SDL.h" but according to the documentation it should work. Any ideas?

Member Avatar for dmanw100
0
114
Member Avatar for Cluelessluke

position and positiondata should be the same? Also the compiler can't find the gsl directory. You're also passing doubles into the abs() function when it wants an int. Try #include "gsl\gsl_rng.h"

Member Avatar for dmanw100
0
216
Member Avatar for dmanw100

I was wondering if there is an easy library that allows reading in a .bmp, mask it, then display it. I believe I could read it in with [URL="http://www.adp-gmbh.ch/win/programming/graphic/bitmap.html"]this[/URL] but I cannot do anything else with it. Your help is appreciated! Any suggestions?

0
103

The End.