49,761 Topics
| |
I'm trying to create a function that uses loops to determine the roots of an equation using the Newton-Raphson method. I have my Newton function set up to take the input from my main prog, calculate the roots, and then return them back into the main prog. Somewhere along the … | |
hello I have an error with template class and I can not understand what is the problem? the code illustrate the arrangement of many of books by its publishers' names and if the books have same publisher arrange them by the title of the book . [COLOR="Red"]the error is instantiated … | |
Hello all, I am having a bit of a problem with a part of my assignment I hope you can help me out with. I created an abstract baseclass called Geometry and 3 derived classes called Box, Sphere, and Cylinder. I am having a few problems though and I hope … | |
HOW CAN I MAKE A SCORING PROGRAM WHERE IN WHEN A GAME IS PLAYED THERE IS A PART WHERE THE TOP 3 PLAYERS WILL BE DISPLAYED, FOR EXAMPLE WHEN A PROGRAM IS RUNNING 3 PLAYERS WILL PLAY ONE AFTER ANOTHER, SO THE SCORES WILL BE STORED IN AN ARRAY OR … | |
Hi, I have a two dimensional vector and I am trying to access all the elements of one row at a time. I am getting a syntax error. Following is my code : std::vector<int> row; std::vector<std::vector<int> > event(5,row); for(lv = 0; lv < 5; lv++) { for(int gno=event[lv].begin; gno != … | |
CAN YOU HELP ME W/ THIS? 1.) I want to create an array to store the total sales for an ice cream store for Monday through Friday. After the array is filled, ask a user to choose a day of the week (Monday = 1, Tuesday = 2, ....) and … | |
Hi, I have generated random unit vector. I would like to rotate it around the axes X,Y,Z in a random way. I thought that I generate 3 random numbers, e.g. 0,1,2. And if the random number is 0, then rotate the vector around X, And if the random number is … | |
I am working on a home work assignment which is: "Write a program that will allow the user to enter an infix expression terminated by '=' your program will convert to Postfix notation" enter 3+7-6/2*8+7= prints 3 7 + 6 2 / 8 * - 7 + I have written … | |
Suppose we have got ten computers in a sub net , each of which is also connected to internet. Each PC has lot of documents , user can also access internet and save web page as a document, Now how can we scan through the sub net to find out … | |
Hi. I'm trying to write a program that prompts the user of a message at a particular date. For example, a memorable date is set, and the program recognises this date from the code and lists a message. I would like to know how to make something that can capture … | |
. . I have a textBox that contains some lines of text. What I wonder is if this was the textBox that I am writing in now and the 2 . . above these lines will represent completely emty lines. What I am trying to do is to make a … | |
For the string: "Number(1234)". I am looking for to extract "1234" and "Number" I have understand that I need to know where the positions is for ex "(" and ")". The code I have done so far look like this: [code] std::string Value10 = "Number(1234)"; size_t found1; size_t found2; found1 … | |
I've been having troubles in getting 2 variables from a function. I've tried to put 2 variables in a function and somewhat code it like in vb put it doesn't save it, even if i declare 2 variable as globals outside of the main. and also my loop statement is … | |
I am having a strange problem. Please help me. I have a code which tries to solve the queen's problem. It is wrong so please dont bother yourself with the code unless you are interested. The problem is that when I execute this wrong code, it goes into infinite loop. … | |
I did HANDLE hHeap = GetProcessHeap(); which gives me the handle to the heap of the process then i did DWORD dsize = 468178553; (near pointer)PBYTE pBuffer = (LPBYTE)HeapAlloc(hHeap, 0, size); but here i got pBuffer as NULL and then i did _stprintf( (TCHAR*)pBuffer,"", , ,); here my program crashes.............may … | |
/*Your task is to create the special functions used by this routine, which are shown in blue in the above program. You need to write the functions so that they can be used by the main routine as shown. In other words, do not change the way the functions are … | |
hello guys this is my first post. I was wondering if you guys can help me out validating this peace of my crazy programming. Just taking a class this semester, and i have looked around every where but i cant seem to find a standard it seems like there are … | |
I'm new to C++, and my goal is to open a file with numbers in it, and see if they are in order. I also need to check to see if they are strictly increasing, strictly decreasing, or neither. if anybody could help me get started for checking if they … | |
Write a program that uses while loops and performs the following Prompts the user to input 2 integers firstNum and secondNum // Easy Output all odd numbers between firstNum and secondNum // No idea how to start that. Outputs the sum of all even numbers between firstNum and secondNum Output … | |
I am a new student of c++ and am having a hard time with a program. i have never used filestreams before and been getting an error from the compiler that i do not understand. it reads ['struct std :: string' has no member named 'c-string'] i dont know if … | |
Hey I am writing a program that will mimike a dice roll. I have the dice based on the value of a random number. the only problem is the random numbers don't change from one run to another, here is the code. #include <cstdlib> #include <iostream> using namespace std; int … | |
Hi, Can anyone explain to me be basic functionality of a filter in MS Visual C++ ? I need to use one to check the database for a file name; if the file name exists in the database, alert the program user that the file has already been uploaded to … | |
I want to disign a class, which can include a reference of a instance. But the class of this instance is not confirm. In java I can use "object" class, because "object" class is father class of all class. for example class XX{ ... ... private object YY; ... public … | |
I am using istringstream to put strings separated by commas to own std::strings. I have done this wich works: [code] std::string One, Two, Three, Four, Five, Six; std::string Value = "a,b,c,d,e,f"; istringstream is(Value); while ( getline(is, One, ',') && getline(is, Two, ',') && getline(is, Three, ',') && getline(is, Four, ',') … | |
I have a line in a .txt file that starts with the word "Words". What I am trying to do now is for the example below to find all the words after "Words" that is before a "(" wich in this case is "One" and "Two". As seen they are … | |
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int num; int guess; int noOfGuesses; bool done; cout << "Ready to Play the Guessing Game?" << endl; cout << "Think you can beat me? You have 5 Guesses!" << endl; num = (rand() + time(0)) % 100; … | |
i am new to dis programming world n programming languages ...so plz help me n tell how i b a gud programmer...my coding is week wat shall i do 2 improve it plz help me:( | |
I'm having trouble trying to figure out how to create a Cartesian Graph for the formula y=x^2 so that it looks like the following. ------* ---* --* -* * *please disregard the -* Current grid parameters: 20 X 20 array with step 1 I know I have to create a … | |
Hi everybudy.....:) i have just stepped into dis programing world(c++) n find it very tough coz i had studied computer only upto 8th grade..........im not gud in programing infact a very bad programmer.........although my concepts are almost clear but my implementation mostly goes worng........:'( how can i solve dis problem????????????? … | |
Hello. I'm very new to Compuer Science, and I'm taking a class for fun but I recieved a really hard assignment for homework that I was hoping to get a little bit of help on here and there. It's only compter science for beginners, so I hope it isn't that … |
The End.