49,761 Topics
| |
| I'm a CS student and am trying to construct a sort of mathematical/algorithmic club/society. I already have a few willing students/TAs/Professors but sadly almost all students don't understand the importance of math to computer scientists. So we are trying to spread awareness first through a few presentations and seminars. Besides … |
its it skipping. This is the part of the code. :( cout<<"enter a string\n"; getline(std::cin,phrase); [CODE]#include <iostream> #include <string> #include "phrase.h" #include "EA.h" #include <cstdlib> #include <time.h> int main() { phrase a; EA b; std::string phrase; int populationsize; //int percentmutation; std::cout<<"enter a population size\n"; std::cin>>populationsize; b.setpopulationsize(populationsize); //std::cout<<"enter the percentage you … | |
Hi, I have to create a maze in C++. // Below is the problem Statement Let's use a simple case of a w=4 (columns) by h=3 (rows) maze to illustrate the maze-generation algorithm. We will start with 4 × 3 = 12 closed rooms, arranged in a 4 by 3 … | |
Hi. I have a printscreen and I want to find a way to make a program that can analyse that printscreen in order to identify two poker cards in a specific location. So I probably need an image analysing library. By the way I'm new in this forum, is there … | |
I have started this program and have finished the first part and it builds just fine but when i debug it I am gettin an error message Run-time check failure#3 - the variable total_sales is being used without being defined. Can some help me out? #include <iostream> using namespace std; … | |
What Should i use to make a game like this?.... How do i accept the right words coming from the users?? can u give me some advice because i really need it ...... Thxxx | |
Hello all, I have a few questions about C++ (I have programmed quite a bit in VBA and some in the past using C++, and have been working through relearning C++). Currently I am working through a bit on the "Char" variable type. regarding the following (from the FAQ): * … | |
I have a pair member data in a class: pair<double,double> memory; How can I change the firs or second element? If I simply write memory.first = 42 the compiler says read-only structure If I use memory = pair<double,double>(42,42) than: error passing 'this' argument I dont understand, please help me | |
Back again, with another homework problem that is stumping me. Ok so assignment is to design 3 classes: Ship, Cruise Ship, and Cargo Ship. Ship should: member variable for name of ship (string) member variable for year ship was built (string) constructor and accessors and mutators virtual print that displays … | |
can anyone tell me the merits & demerits of friend functions? p.s. help me kushal | |
I am trying to change the array in this program from a static array into a dynamic array. I'm totally lost on this one and could use a little help. There are a few other problems in the program, but the only thing I'm worried about right now is getting … | |
hello , I need to know how to get the direction from point A to point B eg. point_direction(0 , 0 , 100,100); would equal 315 x1 y1 x2 y2 how do I compute this ? Thanks ! | |
I'm in the process of reworking a bit field that I built to condense a collection of rule activation flags for a game I'm working on. I need to change the "multiplierRule" so that it can represent 2 different variations of the same rule as well as an "inactive" state. … | |
Hello, Currently, i was assigned to create an array, which i have no idea what array is. The problem is this.... 2.Write a function to read in numbers and put them into the array. The function should continue to read in numbers until either: the user types a negative number, … | |
Hi all, I am trying to learn the basic concept about array, however when I tried to change the type into string, it shows error .. I am using IDE visual studio 2005 [CODE]#include <iostream> #include <string> using namespace std; int main() { string stName[20]; cout << "what is your … | |
how to create windows.h header file It is doesn't on my PC .Please give me windows.h header file | |
Guys I'm having a problem which is really annoying me .. I'm trying to change a normal class into a template class, but every time I try to do that I get a bunch of problems with the object of that class and the template : let's say I have … | |
Hi all, Ok, so I am new to C++ and whilst I understand most of the theory, I am still struggling with the practical applications! I'm trying to write a program that will allow a user to enter 10 whole numbers, then return the sum of all 10 numbers, the … | |
a requirement was sent to me below: API should be in the form of static library. company xxx will link the library into a third party application to prevent any possible exposure of the code(dll) could they mean an import library? An import library is a library that automates the … | |
hey guys im working on a project which requires two tasks 1) count the total number of clumps in a program which i already accomplished. 2)find the longest clump in the string and output it(for example if string is aaaabbbcccccccc so the longest clump is cccccccc >>clump is string of … | |
I want to convert the text string from a file into binary and then create a new file holding these binary. I am using the VC++ 2008. I have done some search on the internet, but hardly understand. Can anyone give me idea or sample code with explanation? Thanks in … | |
Hi @ all, b4 things get serious. :icon_smile: Im using MFC with VCPP 6. I have a simple dialoge based app. Im using a triggered event with which I want to update the content of a CEdit box. The ASSERT of IsWindow fails because m_hWind = 0, I figure this … | |
Hi all. I am doing a project with visual basic 2008, i'm using c++ windows form. i have a question about the code for this particular button, where i wan tis button click to be link to another folder. For example, when clicking this button [btnDownload], it will open the … | |
Hi, How to get cpu utilization for solaris using c or c++ ? | |
Hi all, Im currently doing an assignment where we have been told to write a program to input 2 values (namely the area of wallspace to be painted & the price of the paint) & then output several other values based on the values input. At this point I'm writing … | |
Hi All, Can any one tell me,what is the difference, if a static data member is defined in public scope of a class declaration or if it is declared in private scope of a class declartion? | |
Hey Narue! I need ur help on a upper-lower case switch problem.. Read the contents of a text file (using ifstream class).. and create a new file or edit the same one (using ofstream class) to switch the case of each char (upper to lower & vice versa).. Thanks a … | |
WE have the && operator, the || operator, but xor is only implemented as '^' . And this causes a lot of confusion. Let's take this case: 2 == 2 ^ 2 generates a logical operation instead of bitwise operation , therefore returning a true value. What do yo think: … | |
OMG im a IT student but i am not good in programming!! can i ask some question how to be a good programmer????? plss answer my question | |
Hi, everybody. I've started learning about recursion, but I'm having a hard time completely understanding it. I've tried to write a simple recursive function that returns the sum of the series m(i) = (1/3) + (2/5) + (3/7) + (4/9) + ... (i / (2i + 1)), but I keep … |
The End.