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

delete pPos pointer crashing program. Other similar ptrs ok
 
If I uncomment 'delete pPos' the program crashes on close otherwise it closes normally. namespace cleanup { void close_it() { //cleanup ...
[5 replies] Last: Altogether still a learning moment. memory that pointer is pointing ... (by technologist)
Parsing through a file
 
How could I read a file like this: Category ID Description 1 Pay Check 2 Groceries 3 Utiliti...
[4 replies] Last: string trim( string s ) // Remove leading/trailing blanks { ... (by lastchance)
dna to rna do not understand the question
 
DNA is made up from 4 different bases (nucleotides), adenine (A), thymine (T), guanine (G) and cytosine (C). This is true for plants, animals, bacteria, in fac...
[4 replies] Last: thanks (by mattpanda)
need help on arrays
 
Hello, so I've started learning C++ and came across this example on arrays. Can anyone explain how would I write the code? Thanks alot. A car dealership has ...
[1 reply] : http://www.cplusplus.com/forum/beginner/225426/ (by helios)
Need help adding and reducing fractions
 
#include"hw3functions.hpp" #include<iostream> #include<string> #include<cstdlib> using namespace std; int main() { char pick = ' ';//variable that ...
[2 replies] Last: std::gcd () (by jonnin)
3D ball moving forwards and backwards forever problem
 
hi i just wanted to know how to make a ball go forward and backwards forever and also change the speed i have been able to make it go forward and stop at the wa...
[2 replies] Last: sorry, do you want it to go on forever or want it to go forward, back,... (by jonnin)
I've never seen this syntax before. What is it?
 
Hey all. I have not done much C++ in the past 20 years or so. A lot has changed since my college days. I ran across some C++ syntax today that I was not able ...
[2 replies] Last: Yep, ok... I feel dumb now. I've done C# for so long that I've forgot... (by RickBlacker)
by roaa
something understandless
 
how i can display the temperature data in this question and the what the problem in this function Define a function reading a .csv formatted file with me...
[1 reply] : Where do you read data from file? If function is for reading, then th... (by keskiverto)
Zybooks won't run this?
 
#include <iostream> #include <string> #include <sstream> using namespace std; int main() { string userStr; //User input bool inputDone = false; //if user i...
[4 replies] Last: Hello! Thank you for the assistance, it is exactly because I didn't pu... (by verdantgale)
Working with std::algorithm functions
 
Hi, Here is the drills of chapter 21 of the book Programming Principles and Practice Using C++ 2nd Ed : https://s7.postimg.org/s585rhtor/Capture.png I'm on t...
[14 replies] Last: Thanks for the explanation. (by Frank14)
Which is faster? std::function or a C-style function pointer?
 
Hello, I stumbled across this forum discussion: http://www.cplusplus.com/forum/general/181817/#msg891546 From there it seems like std::function might be even ...
[2 replies] Last: My two cents: A few months ago I tested a complete CPU-bound applicati... (by helios)
by recuva
Ta
 
Hi guys, today I got program for homework to write and I need help with it. I will try to explain what it asks as simple as possible. We got two cars. First car...
[1 reply] : I sort of see where you're trying to go with this, you're iterating wi... (by Ganado)
by Kiyani
Help with Operator overloading
 
Hello I'm trying to use operator overloading to add the values stored in two objects. I'm trying add all the int contents in the program. #include<iostream> #...
[6 replies] Last: Worked thank you for your help everyone. (by Kiyani)
Linked List Union and Intersection problem
 
I am working on a program that will have several sets of data (in files) and will have to evaluate operations given to it by a script file. The operations are u...
[4 replies] Last: It probably would be, but I am having trouble figuring out how to do t... (by Metalman488)
can't access instantiated class member
 
why cant it find orientation.xrot below after instatiation? namespace FPS_cam { class orientation{ public: float xrot = 0, yrot = 0; // zrot =...
[8 replies] Last: Is this set of definitions (lines 2 - 14) in a header file? If so, yo... (by doug4)
processor,memory and all hardware
 
Hi guys so to begin I would like to say this will be a fairly long post so whoever reads this thanks for sticking with me and taking your time to read this much...
[5 replies] Last: assembly language is really just a human readable form of machine lang... (by jonnin)
Hello, how can I place the ñ after age?,and will not let me put another name example "Diego Alex"
 
/* Autor:Diego Definicion;Primer algoritmo*/ #include <stdio.h> #include <conio.h> int main () { char nombre ; int edad; printf ("Escrib...
[2 replies] Last: about gets() [quote=cplusplus]The most recent revision of the C standa... (by ne555)
Polymorphisme: vecteur contenant différents objets
 
Bonjour à tous, je souhaite creer un vecteur contenant différents objets ayant tous des attributs differents. Je dois dans la suite de mon code recuper...
[1 reply] : Bonjour, I hope you are okay with using Google Translate. You don't s... (by Ganado)
Using sscanf in c ++
 
Hello i need help using sscanf to parse commands entered by the user. The function sscanf() can be used to parse the command lines entered by the user. Suppo...
[6 replies] Last: yes i have to use sscanf in c++ for this assignment (by iosgaming700)
debug error in c++ pointer code
 
so i have this assignment that tells the user to input two numbers and lets him choose some basic operations(like a calculator) from a menu. The goal of this ex...
[1 reply] : Hi, The main reason your code only displays history once because its ... (by shadder)
November 2017 Pages: 1... 34567... 16
  Archived months: [oct2017] [dec2017]

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