General C++ Programming - November 2017 (Page 9)

Filling a struct with a text file
 
Hi, Please consider this code. It works well and prints the data correctly. #include <std_lib_facilities_4.h> using namespace std; struct Item { string name...
[6 replies] Last: Your example (and link) was good, @Enoizat. On the whole it's what I t... (by lastchance)
C++ Programming Intro Course Class Program Problem
 
Write a class name StudentRecord with the following specifications – • Data members: - name, marks[ ], major, term (use appropriate data type) • Member ...
[8 replies] Last: If you want input for 5 integers, simply use a cleaner for loop: int... (by Equilibrium)
Conflicting data types
 
I'm receiving an error: "conflicting types for 'size'" and a warning: "passing argument 1 of 'size' fro incompatible pointer type". This occurs in many spots in...
[2 replies] Last: What you have here: int bst_size( struct bst * bst) { is a forward... (by coder777)
Using Boolean Variables and Branching Logic
 
Having trouble running this code keep getting this error when putting g++ /usr/bin/ld:tryIt4B: file format not recognized; treating as linker script /usr/b...
[1 reply] : Name your file tryIt4B.cpp . (by Peter87)
by hmay
Help making this program compile
 
This is supposed to be the game NIM. As far as I know the actual gameplay is sound, it just won't compile. I have attached both my program and the errors I'm ge...
[1 reply] : The first problem is in main() int array_size = 0; //size of the ... (by Chervil)
How to fix the variable length array of non-POD element type 'string'
 
Hello all: I am having the issue with compiling my code. In this program my plan is to write the code which is able to take multiple read input files. error: ...
[5 replies] Last: Thanks It worked. (by HAKAN FRED)
Very Frustrated, please help
 
I have tried everything I know, (which isn't much at all), and I cannot seem to get this program to run properly. I am down to one error, (I think), and canno...
[7 replies] Last: did you set the class variable to the input value? (by jonnin)
mean average program
 
I have a program that computes the mean average for positive integers up to the number the user inputs. I need to be able to specify what two positive numbers I...
[4 replies] Last: Thanks for your help I'll give that a try after work. (by DasherMan)
Into to C++ Programming Class Program Problem
 
Write a class name StudentRecord with the following specifications – • Data members: name, marks[ ], major, term (use appropriate data type) • Member...
[4 replies] Last: updated written code: #include <iostream> using namespace std; const... (by bclacowgirl1)
Mystring Problem
 
In my code I am getting this weird error: s1 = s2 = Hello, World s3 = Welcome to Florida, have a nice day s4 = 12345 Making the calls: cin >> s1...
[3 replies] Last: Driver: #include <iostream> using namespace std; #include "mystring... (by oatmeal678)
return value 3221225477
 
I have this homework program, I am a beginner, it is a simple program but it marks me error return value 3221225477 when I try to run it, can someone tell me wh...
[3 replies] Last: Ive had minor problems with 64 bit ints and C routines in C++ on some ... (by jonnin)
Sparse Matrix stored in compressed storage Vector CSV
 
I was looking for sparse matrix storage when I've found this paper (http://dergiler.ankara.edu.tr/dergiler/29/1520/16736.pdf) in which (never seen before) a met...
[3 replies] Last: there has to be some performance gain that I am not seeing 'at a glanc... (by jonnin)
Segmention fault
 
i have a problem with segmention fault. #include<iostream> #include<vector> using namespace std; vector<int>lottosechser(vector<vector<int>>lottotipps, vector...
[2 replies] Last: you said that you will return a vector<int> from `lottosechser'.... (by ne555)
by Clos
sqrt()function array
 
hello, i am trying to figure out how to use an if statement to out put N/A if the the answer you get from the sqrt () function is an error. in other words if th...
[4 replies] Last: Ah, I thought he specifically wanted to over-ride it to "N/A". I disl... (by jonnin)
check if values are in map
 
hi im trying to create a program that counts words from a .txt file and any time it encounters a new word it starts counting how many of that word are in the fi...
[13 replies] Last: nvm i figured it out (by ReaperSoul)
How to make a simple script parser?
 
I am trying to figure out how I can read a command from a script file, then perform the command in my program. I am going to be given a text file that will l...
[4 replies] Last: It isn't about better ways to do a specific task. Its more about the ... (by jonnin)
error "missing 'typename' prior to dependent type name 'vector<T, A>::iterator'"
 
It's giving me the error mentioned in the title on this code in the custom vector from the book PPP2: template<typename T, typename A> vector<T, A>::iterator...
[6 replies] Last: Ah, so the proposal was made after the standard became feature-complet... (by DragonOsman)
C++ Hash Table
 
I am new to new hash tables and I have this assignment I need to do. I started on the assignment and everything compiles and the program runs fine, but it doesn...
[no replies]
insertion and deletion into custom "list" type
 
This is about the list type from PPP2 in Chapter 20. This is the class and its code as I have it so far: #ifndef LIST_H_ #define LIST_H_ template<typename...
[no replies]
November 2017 Pages: 1... 7891011... 16
  Archived months: [oct2017] [dec2017]

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