49,761 Topics
| |
Hey guys , i haing a problem with using stringstream and atoi . I am trying to conert a string to in integer When using stringstream [CODE] string d = "033116"; int b = 0; stringstream ss (d); ss >> b ; [/CODE] When using atoi [CODE] string d = … | |
I have this array that should be returning a value in the 50's due to the data input i am giving it but it is returning 0 everytime What the code should do is input to and array from the file then pass it to the array monthSum then it … | |
I have been looking into an internship through Google, i have a good basic background, but I need more knowledge, I read C++ Primer Plus 5th Edition and got a good background from it. Where can I continue to expand my knowledge? I am trying to nail a phone interview … | |
I've been given an assignment as follows and I'm having trouble getting it to work properly, hoping if anyone out there can lend word on how to get it running? "A bank account starts out with $10,000. Interest is compounded monthly at 6% per year (0.5% per month). Every month, … | |
Okay here's what I have... it's a start. My only problem is when I run the program the sequence does not print the first 1 in the 1, 1, 2, 3, 5, 8,... it will only print 1, 2, 3, 5, 8,... I believe it has something to do with … | |
Hey, I have a question. I was writing a custom Array type class. In my template declaration I use the type name as DataType. I was making an attempt at creating an insert method, which takes a DataType argument and the index to insert at. I originally had this code: … | |
hello can some one help me out i installed cpp ang i have some prob with nvidia and in another installed cpp output window dont appear it gers compiled in both cases | |
im having this problem when i try to add [CODE] m + 1 = k;[/CODE] it says this- *lvalue required as left operand of assignment* in my compiler, please help. dont mind the unfinished code. [CODE]#include <iostream> using namespace std; int main() { double b, m, k; string x; b … | |
Hi there, I am looking for a C++ library for creating, attaching to, reading from and manipulating Internet Explorer/Firefox/etc... Actually the Library could be for any browser. I am already using libCURL but I am looking for something that will let me navigate easily and automaticaly in a browser (fill … | |
Hey guys, Here's my problem: I've been following [URL="http://www.zeuscmd.com/tutorials/opengl/03-OpenGLWindow.php"]ZeusCMD tutorials on OpenGL[/URL], and when I tried compiling [ICODE]main.cpp[/ICODE], I get an initializer error. I am not sure what caused it, since it seems exactly the same as the example. I linked all libraries it tells me to (-lglu32 -lopengl32). I'm … | |
Hi, I'm writing a scientific application that has to store a large (1GB to 500GB+) amount of data on a hard drive, and then, once written, read it back sequentially to process it. The amount of data for a particular experiment is known in advance, exact to the byte. When … | |
so I have and for loop to find the highest number in and array how would i go about outputting the element number? [CODE]//compares the values in the yearAverage array to find the highest temperature for(int i=0; i<lineCount; i++) { if(yearAverage[i]>=highTemp) { highTemp = yearAverage[i]; } }[/CODE] | |
Below is a simplified version of the function. [code]int x; void myAdd(const double& p) { if (x > 100) { x = 1; myAdd(p); } ++x; ... }[/code] The advantage of this recursion is that I don't have to write a second function ie myAdd2. Are there any pitfalls of … | |
I have a function that should read in data from a file and add them to and array then i pass that array to another that totals the data then i want to find the average of that array and pass the max value to a variable 'max' with the … | |
Nevermind, I wanted to delete this post, but did not want to bother emailing the moderator. Sorry. | |
Please help! I don't understand why I am getting this error: function does not take 0 arguments. The program is suppose to calculate how much fuel is left in the tank after you drive a certain amount of miles. Can someone please help explain why I am getting this error? … | |
I have this question. could anyone help me how to write C++ code for it: A bank account starts out with $10,000. Interest is compounded monthly at 6% per year (0.5% per month). Every month, $500 is withdrawn to meet college expenses. After how many years is the account depleted? … | |
Hi I am creating a Setup and Deployment project using Visual Studio 2008, professional edition. And I was able to build successfully the desired .msi and setup.exe files. Requirement: But I want to create a Setup project which searches registry entries for the pre-installed software (VISA) and install our setup … | |
When I declare a class or an instance of the class, I get the error, error: redefinition of 'class player' then after, I get, error: previous definition of 'class player' by the way, I am using gc++. If you want to see the source, just ask. thanx, JT | |
C++/CLI @ runtime add a PictureBox to a tab control, I need to do this at run-time because they're to represent some data the user must be able to manipulate. I actually need them to be in some kind of scrollable panel on the tabcontrol. Any ideas? | |
Hello! When I build a solution for my program, it does not have any errors. [B][/B]However, in this particular screen (my menu screen), I cannot choose #1 (Cashier Module).[/B] What I mean is, when I enter 1, nothing appears. The choice 2, 3 and 4 do work, however. Can anyone … | |
Hey guys , i am facing a problem using fprintf. Basically what happens is that , i will use it to read from an array and store the information in a txt file. The problem i face is that , for some reason , numbers such as "02 , 05" … | |
So for some reason I my brain seems be failing me :( Anyway....I have a cylinder object in 3D space and inside of the cylinder I have line objects originating at the origin (0,0,0) (which is also the centre point of the cylinder). I would like to find the exact … | |
| |
do anyone know how to write code that can run string from left to right of screen in C++ ? i can do it in c but in c++ it don't support delay(). i don't know it possible or not ,i want to run string at the same time i … | |
Hello all I am a disabled college student trying my best to learn how to program in either C/C++ or C#. I have come here with the hope that I could find a guru to help explain some of issues I am still fuzzy on. I would like to chat … | |
i want to write some code that can input only number or only character ? plz help me ??? | |
[CODE]// This program is supposed to figure out how much does a custom banner cost by figuring out the price for each letter and outputting it's total to the screen. #include <iostream> #include <string> using namespace std; int main() { double cost = 3.45, total; string banner; cout << "Enter … | |
[B][COLOR="Red"][U]Face recognition using Two Webcam with OpenCV[/U][/COLOR][/B][CODE][/CODE] I am very new in OpenCv, and I am trying to use 2 USB webcams with OpenCV, so can anybody help me how I can start this and understand it in short time. best regards, | |
The End.