General C++ Programming - May 2013 (Page 24)

what is instantiated
 
i am trying to push_back a vector but the compailer tell me: instantiated from here non-static const member `const std::string Robot::name', can't u...
[7 replies] Last: Hmph. From gcc, I get: error C2660: 'Function' : function does not t... (by cire)
Static Variables
 
From my book "There are some things you can’t do with automatic variables within a function. You can’t count how many times a function is called, for ...
[11 replies] Last: Alright thanks Zaita! Thanks Daleth for your help, your examples were... (by Anmol444)
Do while loop buggy [Need helps]
 
int pincode(int chance,int pin){ int actualPin = 1103; if (actualPin == pin){ chance = chance +1; } else if (actualPin !=pin) { cout <<...
[1 reply] : This condition (chance != 4)||(chance!=0) is equivalent to true , b... (by KRAkatau)
The Output comes correct in some cases and wrong in some..
 
Here's the program. It was supposed to make the user enter the contents of an integer array. Display the contents of the array. Then sort the contents and again...
[3 replies] Last: Note: c) is correct 52 is in position 3.... remember the first element... (by buffbill)
by bobr
infinite loop
 
I am having issues with the code bellow. A programmer pointed out to me that I am going into an infinite loop if someone enters and invalid character. I have a ...
[17 replies] Last: @ republic So I reported your post, which removed it. If you don't w... (by TheIdeasMan)
prime numbers
 
So, I am trying to find prime numbers between 1 and 100. I know what prime numbers are. I am using this technique to come up with the prime numbers: a) I wil...
[6 replies] Last: cool,will keep this in mind!! (by dhruv90)
by Amazon
Help with build errors
 
I am using Xcode. For some reason I am getting errors with the following code. #include <iostream> #include <string> using namespace std; class A { ...
[1 reply] : class B : public virtual A (by republic)
Opengl simple blending problem
 
Stuck on things I shouldn't be stuck on as always :D. I have been messing around with glBlendFunc to create a flashlight/spotlight effect on a tilemap, everyth...
[4 replies] Last: You're very welcome, glad it's working! (by xismn)
string stream search
 
I am working on a project which is a fairly simply BAC calculator. I am attempting to grab data from a text file, which contains state abbreviation, maximum BAC...
[1 reply] : You're only reading the first line of the file. The getline needs to b... (by norm b)
integrator coding for c++
 
hi.. i am currently doing my project which is using matlab simulink software. i have got problem to write the coding for integral by using C++ that can be conne...
[4 replies] Last: currently i am doing my simulation by using Matlab simulink software. ... (by mamahanna)
by pzmf
Need help with my homework
 
This is my assignment Assignment #16 due 5/14 Gas comparison cost of various cars. A company has five cars that give varying gas mileages of 10, 15, 20, 25 a...
[5 replies] Last: Thanks for the advice and solution! (by pzmf)
Simple Question
 
I got a question that's asking "A very large array of elements is to be sorted. The program will be run on a personal computer with limited memory. Which sort...
[no replies]
by Ludidi
Arithmetic Operators
 
The Program must allow users to enter any two positive numbers and then display the results. i'm strugglin #include <iostream> using namespace std; cla...
[2 replies] Last: sorry it wont happen again the thing am very very desperate (by Ludidi)
How to use '&' and '>>' on a double number
 
Hey, I am working on a project where I need to retrive a double number and store 8 bits of the number in one field and the other 16 bits in another field. the...
[1 reply] : floating point numbers have intricate inner structure, so there is no ... (by MiiNiPaa)
string loop rectangle display
 
I have been writing a code to display a "mailing label" with user input. The "label" is a rectangle outlined with "X" and inside that the information will be di...
[no replies]
Saving tree to file
 
So I have this game that builds on it self 20 questions and it improves as it learns from you however I want it to save the improved tree as you play and the ne...
[2 replies] Last: // FILE: useful.h // PROVIDES: A toolkit of useful functions for rand... (by OLittleO)
compailing problem
 
i cant understand what the problem with my code header file #ifndef ROBOTDB_H #define ROBOTDB_H #include <iostream> #include <string> #include <vecto...
[1 reply] : http://www.cplusplus.com/forum/articles/40071/#msg216270 grep error (by ne555)
C++ multiple choice questionaire
 
Could you check if the answers I chose are correct? I want to double check that I am understanding these concepts correctly. Thanks in advance! -Gluttons
[15 replies] Last: variable length arrays are supposedly only in C99, and hopefully neve... (by Cubbi)
by cgw122
Random images with Gdi+
 
I am attempting to read a random image out of a directory using gdi+. I am attempting to do it by building a vector of all the files in the directory, then cho...
[no replies]
data from txt file into array
 
#include <iostream> #include <fstream> #include <string> #include <cmath> #include <stdio.h> #include <ctype.h> #include <iomanip> #include <algorithm...
[4 replies] Last: I made the changes you suggested, as you can see below string bac , p... (by tonismahonis)
May 2013 Pages: 1... 2223242526... 47
  Archived months: [apr2013] [jun2013]

This is an archived page. To post a new message, go to the current page.