60 Posted Topics
Re: Your problem is that this for loop never runs. You have the greater than/less than sign mixed up. change [CODE]for(n=1; n>=100; n++)[/CODE] to [CODE]for(n=1; n<=100; n++)[/CODE] | |
Re: It seems like it would be easier to use prompts than textboxes, since textboxes are for text and I think it's not as easy to use them for math. I'd do something like this (which is just an example, and not exactly what you wanted to do): [CODE]<body> <script type … | |
Re: Have you tried writing the text to a file instead of just to the screen? Then when you need to retrieve it, you'll have everything saved in your file. If that's not the answer, maybe a different compiler would work better? Dev-C++ wouldn't scroll for me when I used Vista, … | |
Re: [QUOTE=ausmaya;1147242]Hi, I have created a .gif image in photoshop,then i have linked the location in html coding.But i am unable to see that image in internet explorer.I am able to see a red crossed line.How to make that image to display??[/QUOTE] It is hard to tell what is going wrong … | |
Re: You can create a file and write to it like this: [CODE]#include<iostream> #include<fstream> // for file reading & writing #include<conio.h> //for getch() using namespace std; int main(){ fstream myfile; //you can use ofstream for writing to a file and ifstream for reading from a file...& probably should myfile.open ("MyNewFile.txt"); //put … | |
Re: Have you thought about using a matrix to store the board instead of a 2D array? Of course, you'd still have to compare adjacent positions in the rows/columns. Maybe you could do something like: [CODE]for(int i =0; i<SIZE-1; i++){ if(rowPos[i] ==rowPos[i+1]){ points++; } }[/CODE] Where SIZE is the amount of … | |
Re: That code works fine for me (in Dev-C++). No errors, no warnings. | |
Re: You probably want to write [CODE]printf ("\n");[/CODE] instead of [CODE]printf ("/n");[/CODE] :) | |
Re: Hello. I'm new here, too, but I have read the site rules. You're supposed to show an effort before the site's members will help you. But the answer to your question is yes, there is code to solve that problem. I'd get user input, put their numbers into an array … | |
Re: It seems to me as if your problem is when you try to call your function within your function. I commented it out and the program no longer freezes, although the count is not correct. Maybe you can work with this, and get it working the way you want: [CODE]ptr=str; … |
The End.