49,761 Topics
| |
given the equations is it possible to develop midpoint algorithm for: hyperbola :ellipse :parabola :circle ?? | |
hi there ... i am programming in dev c++ although it is very similar to tc++ but there is a certain difference between the two. so does anyone has an ebook on it or a link of any such ebook..... my email address is [i]removed[/i] | |
[CODE=c++]string a = "hello"; char b[20];[/CODE] Other than a for loop to copy character by character over is there some sort of function to convert strings to non const chars arrays? I don't even know if it exists or not but some kind of non const cast for a.c_str() perhaps? | |
So after a day or two of trying i finally found out how to do this, my question is, is there any way to do this that is more efficient without using the prime function? [code]#include <iostream> using namespace std; int main() { std::string line; int i, p, x; for(i … | |
Hi guys, How do I pass arguments into into the constructor if I'm using new to creat an array of objects? So for example: CParticle* parts; parts = new CParticle[100]; parts is declared globally, but initialised later on in the code.. my lecturer suggested this strange syntax: parts = new … | |
[code] if (decision == "B" || decision == "b"){ for (k =0; k < rows; k++){ for (m =0; m < cols; m++) switch (image[k][m] = image[k][m] + brightcount) { case '0' : cout <<" "; break; case '1' : cout <<"-"; break; case '2' : cout <<"="; break; case … | |
Hi to all I need help with this program, i have problem, i must write it out from left to right not from right to left, but i do not know how to do it, when i change something in program, than it is not working :( here is the … | |
Shouldn't [I]continue[/I] in my [I]else[/I] statement return me to the top [I]do...while[/I] loop and print the following again? [code] #include <iostream> #include <string> using namespace std; int main() { double withdraw, deposit, balance, newBalance, amount; char ans; string choice; balance = 1000; cout << "Welcome to Whatever ATM!" << endl; … | |
This is my first time posting an I need some quick help. I need to get this program to work for two players. once Player 1 loses Player 2 gets their turn. the program works fine just can't figure out the while loop for 2 player. [code=cplusplus] /* header files … | |
hey there. my problem is pretty simple (i think). I dont know how to point at a multi dimensional array.how i understand normal array pointers is: [code=C++] int numbers[5]; int *p = numbers; //so now *p points to numbers[0] //so if you say: *p = 10; //is the same as … | |
Conjunto is classtype that implements an array of pointers to some other class objects, i'm trying to overload the % operator so that the result is the join of both arrays into one. eg. array1%array2 = array1 + array2 im' trying to use methods of the class Conjunto such as … | |
hello everyone,i'm new to classes but i have adapted well with it. i've been given this task and i'm left with three days to submit.i tried it myself but i just can't get it please help. this is the problem below. proram 2 MULTICHOICE VIDEO RENTAL SHOP needs an Object … | |
Hello guys help me with a code that hides a document say for example in my documents you can email at <snipped> if you get the code or anything about c++ | |
| |
hello everybody... i am trying to make a project on binary files and that needs a function to modify data in a binary file. I have made the following class. [code] class example { public: char name[10], number[5]; void getdetails(); void showdetails(); example() { name[0]='\0', number[0]='\0'; } char* getname() { … | |
How do i terminate a loop. i have written for(int i = 0; students; i++) but it keeps on going forever and will not stop. | |
Can else have more than one statement? [code] if (control) <statement> else if (control) <statement> else { <statement> <statement> } [/code] | |
Hi, I am new to C++ and I joined this forum with hopes of learning as much as i possibly can about the language. This seems like a nice place with a mature community. I bought a C++ book and I'm just now learning the basics such as goto, for, … | |
hi! smart people. It is my 11 days of reading and studying this book turbo c/c++, and I'm almost in the last part of the book. It is fun learning computer programming using c++. I'm having problem on how to apply the principles, that i've learned,so I need an example. … | |
I am looking to make a small program for a friend who likes to play roulette. I am looking to make a program that reads from a file which contains numbers (the numbers that come out in roulette) and then counts the amount of numbers that fall in certain groups. … | |
Hi, i am having some trouble trying to finish my program! So far i have been able to load the data from a file into an array! Although now, what i cannot do is use this data. I cannot figure out how to use this data later in the program! … | |
hi i am writing a program that counts words containing at least 3 different vowels using functions and also input files.i am confused here and don't know what to do.in this program i am to write another function that will output either 1 or 0 when a character is a … | |
I'm using Borland Command Line Compiler and want to use the regexp.h implementation of this header file. Where can I find all available functions and their definitions and maybe samples or examples of how they are used ? Thanks. | |
Hello. I wrote a program which works fine, all i need is to add one more thing. When I ask the user to input an answer (withdraw, balance...) I don't know how to prompt them if they enter something else, such as "golfball" and loop them back to entering the … | |
Ok i have a file of names that looks like this: [code] john mary joe matthew [/code] im trying to use a for loop to store each name in a variable or string so i can use a for loop again later to output each name im pretty new to … | |
I would ultimately like to write my own OMR (Optical Mark Recognition) program. What language would you recommend is best to carry out this task. | |
I decided to revive my (many months) inactive site today using things I've learned about C++ CGI and the Document Object Model along with CSS. The site is still down, but I'm trying to get back into CGI after leaving it alone for a while (also months). I've spent the … | |
Lately i've been having some problems, importing an SDL library, into my compiler, and as a result of that i have chosen to change to a new compiler. I have followed 3 differend online tutorials, re-installed the compiler three times, and done it with three different downloads of the SDL … | |
I am working on a project to demonstrate the use of strings without using "strings" in the formal definition, as in using pointers to arrays of characters. The program is supposed to pick a string from an array of pointers to chars, but allow the program to include more words … | |
I have a program that takes two separate arrays one of all the peoples names and the other of their test scores. I am not sure how to display the scores in a table view. here is my code so far [code=cplusplus] #include <iostream> #include <string> #include <math.h> using namespace … |
The End.