Beginners - April 2016 (Page 36)

Writing to a csv file
 
Hey guys, I've been trying to save user input to an excel .csv file, but I can't seem to get it right, nothing is printed, also, how can I make it so it writes ...
[1 reply] : To give you an idea, look at lines 38 to 50: #include <iostream> #in... (by chicofeo)
Implementing Ryser's formula
 
Hi all, I'm currently trying to write a piece of code that gives the number of Latin squares from a formula that was found. One part of the code requires to ge...
[1 reply] : Horror code. Something is allocated with new and promptly forgotten... (by keskiverto)
Issue with a while loop
 
So I am writing a simple while loop program that calculates a discount for a number of shirts a person enters into the program. For the most part it works, how...
[3 replies] Last: Line 54: Remove the ; The ; makes the following statements unconditi... (by AbstractionAnon)
Reading in multiple files into a c++ program
 
If I have a folder that has 3 .csv files in them and I want to read in the data and store them in a vector, how would I go about this? I know how to read in a s...
[1 reply] : If I have a folder that has 3 .csv files in them and I want to read i... (by pnoid)
Trouble with my counter increments
 
I'm trying to create a counter that increases in increments of two in the first column and then also increases in the second column with the numbers in the firs...
[3 replies] Last: I forgot I posted a response here. Sorry. Right above your cout in you... (by pnoid)
I need help with C++ quiz grader
 
Okay I have been stuck on this code for about a week, and my professor is not really helping me so I thought I would go here. This is what I have to do : Using ...
[3 replies] Last: Thank y'all for the replies. Yes I have figured out the code, and I di... (by Unisaurus)
by thor36
How to build a program in IDE, with information from makefile that built it (in msys mingw)
 
Greetings all, I used msys64 - mingw32 (on Windows 7, 64 bit) to build a 3rd party library (https://sourceforge.net/p/libosmscout/code/ci/master/tree/) using a...
[no replies]
Print Deepest node
 
How should i print the deepest node,i using count to print but it doesn't work pls help and guide me.Here are the code i have write. template <class T> ...
[4 replies] Last: the node store their depth Then perhaps something like: U * foo( U ... (by keskiverto)
C++ program unknown error
 
Dear Experts, I'm learning c++ from a book. It has a exercise which is giving error Eclipse c++ compiler Error: strcpy was not declared in this scope ...
[3 replies] Last: Error: strcpy was not declared in this scope Error: strcat was not de... (by jlb)
What to do Dynamically Allocated Arguments
 
Hi, Forum.   How do you delete new memory allocated in a function call argument? Or should you?    So let's say you have a class with a construc...
[1 reply] : Smart pointers would be required if you must do what you have describe... (by ChajusSaib)
by hayyan
simple calculator
 
#include <iostream> #include <cmath> using namespace std; int main() { int a; int n1; int n2; cout << "enter operator: " << endl...
[1 reply] : int a; should be char a; instead. (by Hesham0)
Run into some problem looping
 
Hello. So, I'm new to C and I'm currently trying some new code with C. However, I stumbled upon a problem with this code. I tried to do a selection loop where ...
[3 replies] Last: Oh lol. I see.... Thanks guys.... I'm totally noob when it comes to th... (by Vangyra)
Nested For Loop
 
Ok so, my teacher want us to use 2 nested loops to output this * ** *** ** * I gave it a try, and got this output. However, he didn't like the way I did...
[4 replies] Last: Then do your own: int n; if (x < 0) n = 3+x; else n = 3 - x; ... (by dhayden)
File Manipulation Program
 
This program is designed to change the values of the characters in a file and "encrypt" or "decrypt" them by adding or subtracting a user-entered key from each ...
[4 replies] Last: I think it was my compiler, as it runs now on a different one. But the... (by dnorton)
How to write a test driver?
 
I'm supposed to create a test driver for this program but I have no idea what exactly that entails. I've looked at the test driver tutorial that pops up on goog...
[2 replies] Last: The first step is normally to take paper and pen or maybe a spreadshee... (by Thomas1965)
Strings and vectors, deleting duplicates of a word in a sentence.
 
So I have to make a code checks if a sentence is read the same forwards as backwards. Then make sure there are no duplicates of the same word used twice, ex - "...
[3 replies] Last: Are you looking for duplicate words or repeated words? In other words... (by dhayden)
Opening specific link in c++ program
 
How can I open a link using the input that the user gave in a c++ program? For example I want to ask the user to enter their facebook name/youtube channel name ...
[2 replies] Last: Hey, thanks for the reply! My code now looks like this and works as in... (by TheYatoGod)
Double function returning the wrong product
 
I am trying to write a program that displays the total pay for an employee with a time and a half overtime pay. I am entering in 41 hours and a pay rate of 10, ...
[1 reply] : What is line 11 supposed to accomplish? (by cire)
by slex04
Need some assistance please
 
I'm a beginner with C++ and wonder if someone could assist here. #include <iostream> #include <string> using namespace std; void inputData(string name, st...
[1 reply] : The cin>> reads one word only. No spaces inside. Use std::getline ... (by keskiverto)
How do I extract a single digit from a 3 digit whole number?
 
This isn't a homework question, I'm just curious. If I had a program that calculated a 3 digit number, say 123, how can I get just the "1"? I'm trying to print ...
[2 replies] Last: http://www.cplusplus.com/forum/general/78209/ (by DirtyDan)
April 2016 Pages: 1... 3435363738... 43
  Archived months: [mar2016] [may2016]

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