General C++ Programming - August 2015 (Page 16)

Link error(PPP using C++, Chapter 12)
 
Hi, I'm reading Bjarne Stroustrup's "Programming Principles and Practice Using C++" and I got a problem in Chapter 12. I keep getting "unresolved external symbo...
[4 replies] Last: JLBorges, thanks for your wibsite. Now I have at least one program tha... (by LawrenceCao)
tellg() vs. tellp()
 
Hey there, please somebody explain why the output is 7 and not 8: #include <iostream> #include <fstream> using namespace std; int main() { ofstream outF...
[2 replies] Last: Thank you, Peter! (by leonid1990)
by DLCom
Math Parser failing - can't get the error
 
#include <iostream> #include <vector> #include <conio.h> #include <string> #include <sstream> enum tokentype {TT_NUMBER, TT_PLUS, TT_MINUS, TT_MUL, TT_DI...
[no replies]
how to tranfer data from .csv to a double dimensional array in c++
 
#include <iostream> #include <string> #include <fstream> using namespace std; int main () { ifstream inFile; inFile.open("C:/Users/Saad/Desktop/book2.c...
[1 reply] : Please, edit your post to enclose the code in code tags and be systema... (by keskiverto)
Using STL's qsort function for a vector object
 
Before I offer any elaboration on the specifics of my problem, I would like to know the answer to the following question: Is it at all possible to use the S...
[5 replies] Last: vec which is the name of the vector object could be viewed as a poi... (by MikeyBoy)
Error while Compiling : Expected ; before int
 
#include <iostream> #include <string> #include <fstream> using namespace std; int main (){ ifstream inFile; inFile.open(":C:/Users/Saad/Documents/number...
[5 replies] Last: IF you can use the code tags, we can see the line numbers and see prop... (by TheIdeasMan)
Need help with a basic c++ code
 
#include<iostream> #include<conio.h> #include<string> using namespace std; class Contact { private: char Name ,Num ; //operator overloading friend ...
[3 replies] Last: This one might be easier to understand http://en.cppreference.com/w/c... (by SamuelAdams)
Need help with a basic c++ code
 
Hello everyone, Can someone create a program for the following question let the program be as simple as possible without any UI? question: "Create a base c...
[2 replies] Last: I can do it, $200, oh wait, this isnt the job board, go post there... (by SamuelAdams)
by ZaitoN
C++ program that types when X happens.
 
Alright so basically I am working on this program that will unscramble a certain word. How I want it to work is this: a) I hit a button to let it know that it m...
[1 reply] : These might help, or they might just confuse you... I don't really und... (by SamuelAdams)
Looking for a function.
 
So, here's the problem. I've got a happy long double named Fred. He looks like 9.56756785685685682595. I need a function so I can round him down that takes TWO ...
[3 replies] Last: Thanks guys. (by closed account G1vDizwU)
by yj1214
Why put 'f' when using float?
 
float x = 5.0f; I heard that without putting the 'f', compiler thinks that x is double. But I declared what type of variable i'm going to use by puttin...
[2 replies] Last: > float x = 5.0f; > I heard that without putting the 'f', compiler t... (by JLBorges)
How to run loop in background?
 
I am making the program in which i require to run two function at a time. One is time function which runs in background and others functions which will work in ...
[2 replies] Last: I'm not sure OP has convinced me that multithreading is the answer he ... (by Duthomhas)
Error with I/O function (1,2)
 
Hey guys I'm getting an error of "Terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct null not valid All I di...
[29 replies] Last: #include <iostream> #include <string> #include <vector> #include <std... (by JLBorges)
Linker error: undefined reference to methods of template class
 
Hello, I just introduced templates into my classes and getting the following linker error (on linux): Linking CXX executable main CMakeFiles/main.dir/main....
[7 replies] Last: instantiating the template class will generate the code for all non-te... (by ne555)
Problem with equal_range
 
So I've got a problem and a question, so firstly I'll ask the question, how come I cannot define files(line 91) as std::vector<std::vector<Sales_data>> files =...
[4 replies] Last: use braces (by ne555)
by ninjaS
read text file in an Array
 
I am trying to read a text file "b.txt" in an Array The file is sinply,it looks like: b.txt 15 2 43 5 22 3 55 3 5 7 8 5 21 43 54 6 all lines have the same am...
[1 reply] : ok, I'll change the solution, it makes 2 scans to the file instead of ... (by ninjaS)
Grading program using structs; ordering by rank and by name
 
This is an assignment I wasn't able to fully implement. I'm reading in students' scores and have to rank them according to their score and name. Originally we w...
[5 replies] Last: Thnx for the input TheIdeasMan ;) I didn't know that I couldn't use a... (by ElTucan)
overload scoped enum assignment operator
 
Yeah, I don't suppose there is a way? (It's totally legitimate! Honest!) [But it's probably a design flaw.] I'm playing with some colors. There are f...
[2 replies] Last: Thank you, that answers my question. I'll continue to use the explicit... (by Duthomhas)
Please help,,basic c++ question
 
Write a C++ program that asks users for two numbers and a choice of the following operations: addition, subtraction, multiplication, division or exit the progra...
[4 replies] Last: @TheRabbitologist Didn't really notice the reference passing. @redst... (by whitenite1)
by s2y
pointer to a function
 
given: the function name as a string need to get a pointer to a function Please help in the implementation, if it is possible to do
[4 replies] Last: Thanks to all that helped! (by s2y)
August 2015 Pages: 1... 14151617
  Archived months: [jul2015] [sep2015]

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