49,766 Topics

Member Avatar for
Member Avatar for CoolGamer48

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, …

Member Avatar for VernonDozier
0
127
Member Avatar for kylcrow

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 …

Member Avatar for kylcrow
0
186
Member Avatar for CodyOebel

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 …

Member Avatar for twomers
0
76
Member Avatar for ShyamalShah

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, …

Member Avatar for neosomosis
0
111
Member Avatar for free2rhyme2k

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)) …

Member Avatar for neosomosis
0
124
Member Avatar for IIMarckus

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?

Member Avatar for IIMarckus
0
140
Member Avatar for Diabloizzle

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.

Member Avatar for Ancient Dragon
0
76
Member Avatar for jimmy.rocks1

i m trying to terminate a thread when it is executing . could anyone help me how to go about this... thanks, aravind

Member Avatar for Ancient Dragon
0
132
Member Avatar for andyg55

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 …

Member Avatar for VernonDozier
0
234
Member Avatar for driplet

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 …

Member Avatar for Duoas
0
135
Member Avatar for Blythe24

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, …

Member Avatar for Narue
0
84
Member Avatar for cpp_noobsauce

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 …

Member Avatar for cpp_noobsauce
0
73
Member Avatar for jobob64

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]

Member Avatar for Narue
0
115
Member Avatar for SteveDee

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 …

Member Avatar for Narue
0
577
Member Avatar for driplet

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 …

Member Avatar for driplet
0
154
Member Avatar for DoctorBob

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 …

Member Avatar for Colin Mac
0
98
Member Avatar for Agni

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 …

Member Avatar for DangerDev
0
122
Member Avatar for winrycool

can anyone give me the program for the 8 queens problem please i need for my project

Member Avatar for WolfPack
0
60
Member Avatar for twoheadedboy

[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 …

Member Avatar for VernonDozier
0
148
Member Avatar for xeption12

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 …

Member Avatar for xeption12
0
130
Member Avatar for Allen 0108

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 …

Member Avatar for Adrian99420
0
110
Member Avatar for gcardonav

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 …

Member Avatar for plgriffith
0
183
Member Avatar for mark192

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 …

Member Avatar for hsram
0
113
Member Avatar for teppuus

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 …

Member Avatar for teppuus
0
177
Member Avatar for Joga

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)

Member Avatar for Narue
0
117
Member Avatar for coolbreeze

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 …

Member Avatar for vmanes
0
159
Member Avatar for k2k

Does anyone know how to delete a specific index of an array? Is there any recommended library out there ?

Member Avatar for Narue
0
109
Member Avatar for nice_sayed

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 …

Member Avatar for zandiago
0
105
Member Avatar for shadowfire36

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 …

Member Avatar for WaltP
0
958
Member Avatar for jimmy.rocks1

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++ …

Member Avatar for jimmy.rocks1
0
122

The End.