49,766 Topics
![]() | |
Hey, Is there anyway to control a volatile number of objects (don't know if I'm using the right term here... I mean when you don't know how many of an object you're going to have at any one time), like bullets in a shooter. If you have a bullet class, … | |
Hello, I have been stuck on this for awhile, and can not seem to get it to work exactly correct. I am trying to read in a file ("in_text.txt") and print out it's contents to the screen for now (eventually i will manipulate the data with a block_cipher class). Here … | |
Ok.. I use c++ numerous times to stream an output to script's to do further operations. Sometimes I need an email script, and will output one and manipulate the script with c++. As dumb as a question as this is I just want to clear my confusion before I go … | |
Introduction Reverend Zeller developed a formula for computing the day of the week on which a given date fell or will fall. Suppose that we let a, b, c and d be integers defined as follows: a = the number of the month of the year, with March = 1, … | |
Hi there I am writing a simple while loop which terminates on the condition that a certain value is found, as follows [code] std::string question = q.quest().que(); std::string answer = q.ans().answer(); std::string graphic = q.inf().info(); std::string english1; std::string english2; std::string arabic1; std::string arabic2; while((answer != english1) || (answer != english2)) … | |
Hey guys, I just have a simple (?) question. What difference is there, if any, between [inlinecode]cin[/inlinecode] and [inlinecode]std::cin[/inlinecode] (for example)? If the latter is better form, why is it so? | |
I am having problems with jGRASP. Whenever i try to compile... i get the error... "g++.exe: installation problem, cannot exec `cc1plus': No such file or directory ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete." Does anybody have a quick fix? I already have MinGW installed. | |
i m trying to terminate a thread when it is executing . could anyone help me how to go about this... thanks, aravind | |
Hello!! I have an array filled with figures stored in an input file. My program has read the input file, and filled the array with the contents. I also have a random number generator. I have made this make 2 random numbers between 0 and 1 at a time. I … | |
The function is as follows: void Runthrough(double * from, double * to, double * when, double * howmuch) { nflows += 1; if (nflows > LENFST) { /* Stack Overflow */ Application->MessageBox("Error occurred.", MB_OK); return; } else { /* Store the arguments in the stack */ flowstack[nflows].from = from; flowstack[nflows].to … | |
Hello- My teacher gave us this problem in a lab and I need help with it. Basically, he wants us to write an algorithm to count symbols. The user will provide anywhere between 3-10 symbols and then an initial number. For example: user: 01234567, initial number: 106 output: 107, 110, … | |
Hi I'm a complete noob to programming but am trying to learn c++. Im having trouble with a small project that I was given and was wondering if anyone could help me out. Here is the sample project that I was given: A certain country charges its citizens an annual … | |
what about overloading the subscript operator to… say sort an array of ints without templates... example: [code] class Whatever { private: int * m_value; public: int &operator[](std::size_t index); }; [/code] | |
I am writing a simple program to read in date from a lotto winning numbers file. The data is structured like this: 01/03/1998 6 - 12 - 20 - 33 - 34 - 50 01/10/1996 13 - 22 - 34 - 40 - 44 - 49 etc. No matter how … | |
Hi masters: I got an error message when I was compiling my code: "E2293 ) expected" It indicates some thing wrong in a line on which I defined a function. There are a lot of arguments in this function and some ones are array. I checked this section many times … | |
Hello.. I finished a program that does multiplication by successive addition.. But now I want to change my program to do division by successive subtraction? I tried to change my while loop to break out sooner but it didn't work... Thanks for any Help! [code] #include<iostream> using namespace std; int … | |
I have a vector of a structure.. say [QUOTE]struct employee { string name; int age; int empId; }; and a vector of this structure RWTValOrderedVector<employee> vec;[/QUOTE] suppose this vector has 4 entries. Now if i want to find in this vector for employee information of a specific employeeid, how do … | |
can anyone give me the program for the 8 queens problem please i need for my project | |
[code=language] #include <iostream> #include <fstream> #include <cmath> using namespace std; //Begin by defining the functions that are to be called in the main program double f (double x) //Function 1 Finding 1/x, the integrand, this shall be called f { //Function 1 Body double y; y=1.0/x; return y; } //End … | |
hi there :) i'm currently practicing with the recursive backtracking method by trying to solve all the suggested problems... one of them says: find all the solutions for the next ecuation: 3x + y + 4xz = 100 so the solution would be of type S={(x,y,z) | x,y,z belonging to … | |
I can only compile my source code if the command prompt is pointed to the compiler directory or the source code directory. Basically, I can get the compiler to compile from either: [B][B]C:\Borland\BCC55\Bin>[/B] C:\bcc32>[/B] or [B] C:\01proj\hworld.cpp[/B] (location of source code) My source code is [code=c++] // C++ code template … | |
Hey guys I know I have posted this type of question before but I want to get to the nitty-gritty of this. I have the following program that sorts ten numbers enter by the user. The program work but I am not able to see the results because the program … | |
I've been programming for about a week now and I'm just learning if statements now I made a simple program that asks the user for a number input (1-4) and depending on what they input it will add/subtract/multiply/divide 2 numbers they enter after they decide what operation they want to … | |
Hello, I am having some trouble traversing backwards through a double linked list. Basically this program pulls words from a text file (I have attached the file I am using), corrects the words and stores them in an array of pointers (one pointer per letter of alphabet) of double linked … | |
Hi everyone, I need help with the C++ program. I need to find a way to write this: compute the product of a*(a+1)*(a+2)*...*(b) | |
I've got a program to write and im struggling to start out.. read one integer, n, from a file, then loop the program n times, using indexes 1-n. I'm not really sure where to start with that statement... Im a bit rusty in c++ haha. Each time through the loop … | |
Does anyone know how to delete a specific index of an array? Is there any recommended library out there ? | |
The Address Book is a collection of records and one record should have following fields about a contact • Name • Address • Phone number • Email address The Address Book program should have the following features 1. Add-to add a new person record 2. Delete-to delete an existing person … | |
ok i just got my ass chewed by my professor cause he gave us a a program to build and i used visual studio to build it . he told me he wants his programs built in a compiler , i told him i was using visual studio , he … | |
Hi, I am having a problem in implementing multithreading in my program.i have a function which goes like this int x=NodesArray[2]->SendData(routeInfo,countDataPackets,pathInf); i want to call this function with the help of CreateThread and i did it this way hThread[0]=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)NodesArray[2]->SendData(routeInfo,countDataPackets,pathInf),NULL,0,&dwID[i]); i just read some programs online and read microsoft visual c++ … |
The End.