Beginners - September 2017 (Page 7)

c++ code output problem
 
*I have a problem with the output of my code. I'm supposed to input this values: Acme Software, Inc. 1000 45.50 56.90 *With my current code, the output...
[1 reply] : Hello bal160730, PLEASE ALWAYS USE CODE TAGS (the <> formatting butto... (by Handy Andy)
Matrix sorting
 
Hello guys, I'm having a issue when it comes to sorting matrix. I got a code but I still don't understand how thw programmer made the compiler understand that t...
[2 replies] Last: #include <iostream> #include <algorithm> int main() { // array o... (by JLBorges)
I need some help making an ascii movement system.
 
I'm trying to make a movement system where the @ is the player and I want to find a way to do it without making a separate if statement for each possibility. Do...
[no replies]
by teeper
Global to Local Variables?
 
I have a c++ project split up in two different files and headers, but I'm having a problem with one specific .cpp and .h file. In the .cpp file, there's global ...
[5 replies] Last: You cannot use an object (variable) without an instance of it existing... (by Duthomhas)
Answer Values not passing properly, help!
 
Hello all, I'm working on a calculator program for complex numbers, and all my functions are working properly with the exception of my swap function. The ide...
[no replies]
Reading in file with mixed data types to struct
 
Hello and thank you for taking the time to help. I am having an issue oh how to read an input file with mixed data types to read into a struct. The file is a ...
[2 replies] Last: I just looked at my data and realized that I added a period after the ... (by closed account NCRLwA7f)
by jsbd29
Help with c++ please help
 
I need some help to understand how to create this code. I've created a file.txt with the names and salary separated and the program is supposed to read the dat...
[2 replies] Last: yeah :) thank you, Andy (by jsbd29)
strtok function
 
Hello I am so sorry but learning to code on my own here. If you can explain for me what happening here it would be great. Things like what does two asterisk *...
[2 replies] Last: You might find the following tutorials helpful to explain pointers, an... (by MikeyBoy)
by Bopaki
I get an error on this line: rev(s[s.length]);
 
I am trying to compile this program and I get this error: 20 10 C:\Dev-Cpp\MalikChapter6\reverseString.cpp no match for 'operator ' (operand types are 'std...
[3 replies] Last: Thank you all!!! It worked so well!!!!!!!!! (by Bopaki)
by sra
pointers
 
can anyone help me with this assignment ,i think i should use pointers but i can't write the proper code .....
[5 replies] Last: If you are not allowed to use the tolower() from the Standard Library,... (by keskiverto)
Initialiaze values of a Singly Liked List by a constructor
 
Hi. I have to create a constructor that allows a new linked list to be populated with ten consecutive values, starting at 0. Then I need to print the list! So i...
[1 reply] : I’ve spotted a couple of issues in your singly linked list, but I’... (by Enoizat)
Unexpected 'inf' Result
 
I'm experiencing an unexpected result in my code. This program allows the user to input their points earned on an assignment, and the program is supposed to cal...
[5 replies] Last: g++ or clang++: compile with -std=c++14 -Wall -Wextra -pedantic-erro... (by JLBorges)
Header file problem
 
So I was given a header file from my professor, we were instructed to create the functions in the class in another .cpp file then create another .cpp file to do...
[2 replies] Last: That makes total sense! Lmao Tysm (by Dennisw95)
Problem to understand casting
 
Why that to ptr1 point to the address of the array I need to do this (int*)&array? what does it means? #include <iostream> using namespace std; int main...
[3 replies] Last: > But the exact syntax of (int*)&arr means what? I mean, how it works?... (by JLBorges)
if logic
 
Why is this if command running regardless if plan input is A, B, or C? #include "stdafx.h" #include <iostream> using namespace std; int main() { ...
[2 replies] Last: http://michael-thomas-greer.com/faq/logic/#or-vs-select (by Duthomhas)
Read data from CSV files into array
 
For those familiar with R, I basically want to mirror SOME of the dataframe functionality in C++. In a nutshell: 1. I want to be able to read data from a CSV...
[11 replies] Last: <tuple>'s are another way to go. Read the first line of the CSV file ... (by closed account 48T7M4Gy)
output 2 arrays in order
 
How can I put 2 arrays together but in order considering that both arrays are sorted? like: 1 3 5 8 9 2 4 6 7 10 output : 1 2 3 4 5 6 7 8 9 10; the i...
[6 replies] Last: still learning all the algorithm stuff. Slowly. Good call on merge(... (by jonnin)
If-else statements outputting all answers
 
Hi hello, I'm new, I'm sure you've seen this all before. I've done lots of searching for my problem and looking at samples of code, but I can't quite figure out...
[3 replies] Last: bool minute ; You are comparing minute against numbers. A bool can ... (by Ganado)
by Bopaki
How can I get the following program to print a string output
 
It prints 1 for TRUE and 0 for FALSE I want it to print "It is a prime number." if the output is a 1. and "It is not a prime number. " if the output is a 0...
[2 replies] Last: Thanks very much AbstractionAnon (by Bopaki)
Creating a struct Iterator to work with files.
 
Hello. I have a binary INT file with values there. So 1 int takes 4 bytes right? So as i can see, my iterator should increase a index so i can move to the next ...
[4 replies] Last: > i need to create my own iterator. If you have been asked to do tha... (by JLBorges)
September 2017 Pages: 1... 56789... 21
  Archived months: [aug2017] [oct2017]

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