General C++ Programming - September 2018 (Page 2)

solving a system of linear equation using Armadillo library in c++
 
I am trying to use armadillo library to solve a system of linear equation in c++. as shown in the code I can define the sparse matrix (A) and vector b with out ...
[5 replies] Last: I have included path for armadillo file in include directory. so #inc... (by MikeyBoy)
Class and Object Calling Problem
 
Hey I have a little problem hope someone can help me solve it. - I have a class it’s own source file. - I have created an object at the end of the class: ...
[3 replies] Last: I think the error was called LNK multiply or something cannot remembe... (by mbozzi)
by stav
Preprocessor to iterate through enum ?
 
Hi im making a lexer and i have this Token struct: #pragma once namespace qq { enum TokenType { Symbol, String, If, FuncDecl, Open...
[4 replies] Last: Boost can also help here: #include <boost/preprocessor/tuple/to_seq.... (by toad)
if else and sending to columnar report.
 
I am new to programming and I am trying in my if else statement (if a bag is over 50lbs for there to be an added 25.00 dollar charge. I set the variable (BagCha...
[3 replies] Last: Thank-you for posting the entire code. Now, go back and read @lastcha... (by doug4)
by les818
creating a program that will capitalize first letters in proper nouns
 
looking for ideas on how to do this using cin.getline
[8 replies] Last: word lets you configure it so that it gets it right nearly 100% of the... (by jonnin)
How to download any file from internet only using C++ Standard library (no third party library)?
 
I know it may be tough to do so. But I was looking for if any guide exists to do that. May be I have to write that function from scratch to do that.
[5 replies] Last: [quote=poteto]I believe the tech spec is an adoption of boost asio, wh... (by Cubbi)
by AM111
C++ Exercise
 
Bom dia, Tenho que criar um programa em C++ que leia dois ficheiro txt. Um deles denominado Encom.txt outro local.txt No ficheiro Encom.txt - Tenho: (Loja;...
[4 replies] Last: The problem was the <<endl; Thanks (by AM111)
Assert and Void Help
 
Need help. It says there is a problem with my asserts (test) and how do I fix the average function. void test(){ assert(findSum(1, 1) - 2); assert(find...
[5 replies] Last: Your findAverage function is putting the "result" into the third var... (by Ganado)
Encrypting any text
 
I need to write a program that transforms all characters of text typed into std::cin into unreadable text, which then is translated back into the original typed...
[3 replies] Last: ^^^ if you choose to use xor (or another self-reversing) as your base ... (by jonnin)
std function
 
I want know how can you use std::function <int (std::vector)> , example or tutorial.
[3 replies] Last: std::function<int(T)> (where T is some class/type) means that it's a f... (by Ganado)
I am trying to create a simple Math Solver Function.
 
The goal of this program is to allow the user to enter 3 numbers, and respectively carry out either Subtraction, Addition, Multiplication, or Division. I'm...
[3 replies] Last: void foo() { double a {}; std::cin >> a; // allow input auto b... (by keskiverto)
Anonymous Namespaces With Using Directives
 
Hello there! Essentially what I want to know is if it's possible to use an anonymous namespace to somehow nest a using directive without it being applied to th...
[1 reply] : (At first, I didn't catch that you needed an anonymous namespace.) Li... (by mbozzi)
E1696 cannot open source file "sys/socket.h"
 
I was working on this project about 6 months ago. It was a windows 10 box and I was using Visual Studio 2017 Community. The project compiled fine. I decided ...
[8 replies] Last: @mbozzi BasicLibTypes.h is listed below. Once I changed the WIN32 to ... (by bishoposiris)
Errors on code using functions: Not sure how to fix them
 
Good day I have written code to display matric students names, school, their mark average, whether they pass or fail, whether the get a distinction, and the co...
[4 replies] Last: I have fixed those errors Actually, you fixed some and created new... (by doug4)
Turning the user cin>> answer into 3 separate variables to add them together.
 
I trying to solve this problem below, its actually part of a bigger program but i'll keep the question specific. This an example of what I’m trying to achi...
[2 replies] Last: you can also read 3 char variables and run isdigit on each one. That m... (by jonnin)
The application supports a table of records using class to input data in data field.
 
The application supports a table of records. Define a class called StoreItem, the instance of which is a record. The maximum number of records in a table is no...
[3 replies] Last: Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
supports a table of records.use a vector or a dynamic array to implement a table,
 
supports a table of records. Define a class called StoreItem, the instance of which is a record.The maximum number of records in a table is not predefined. Your...
[1 reply] : Do not double-post. The other thread: http://www.cplusplus.com/forum/g... (by keskiverto)
Gpa Analyzer need to add grade values in very much a beginner
 
Hello i am trying to add in the range of the Grades like A = 90-100 B= 80-89 etc. Sorry for the question i am struggling here, and i know it is something simple...
[1 reply] : #include <iostream> struct Grades { static Grades get_id_and_sco... (by JLBorges)
by d0253
Read from txt file to array
 
I have two files one with states, and one with numbers. First file: Alaska Alabama New York Oklahoma ... Second file: 293 292 403 101 202 102 202...
[1 reply] : The >> reads only one word. For more. you must getline: http://www.c... (by keskiverto)
Functions, File input/output
 
Hi guys, I have to write a program that does the following: Write a program that reads data from an input file named “input.txt”, and produces two outpu...
[3 replies] Last: Yes (by Thomas1965)
September 2018 Pages: 1234... 9
  Archived months: [aug2018] [oct2018]

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