Beginners - July 2016 (Page 12)

Char array and double variables
 
I'm trying to make the type of animal a char array and make the charge a double, how do I about this? Everytime I run my code, it always loops, continuously onc...
[2 replies] Last: Line 10,23,56: Animal and InitAnimal allow only a single character. ... (by AbstractionAnon)
by CMOM
Array Sorting Error
 
I have finished my code which is used to sort an array, however I continuously am getting an error on line 44 saying "error: expected primary-expression before ...
[2 replies] Last: That did work. Thank you!! (by CMOM)
by benams
Link an external custom DLL
 
Hi all, I'm new to C++ and visual studio. I started a new empty c++ project with a class that has an exported function: #pragma once #ifdef DEBUGMES...
[1 reply] : Creating and using DLLs in the Visual Studio IDE is easier if you crea... (by closed account E0p9LyTq)
Need help on this one error
 
// Bitay #include <iostream> #include <string> #include <conio.h> #include <time.h> using namespace std; int fill(char, string, string&); const int t...
[3 replies] Last: Sorry in advance if I sound harsh but for a start you might like to us... (by closed account 48T7M4Gy)
by hendma
use push_pack for vector pair
 
I am trying to build a function that take a transfer_stops which is a vector of Busstop* and return visit_transfers which is a pair of Visit_stop*, (visit_stop ...
[3 replies] Last: Hi, Sorry I didn't know you were new to C++, your code is reasonably ... (by TheIdeasMan)
Sorting polynomial terms based on degrees
 
I have this code which is about polynomials multiplication. I meet no error, just what I want is to sort the terms based on degrees (from lower degree to higher...
[8 replies] Last: Did you get it working correctly? I believe an earlier version of you... (by AbstractionAnon)
Dice Program
 
Hi, I'm currently working on a dice program in which I'm to create a function (called rollDice) that rolls a pair of dice until the sum of the numbers rolled is...
[3 replies] Last: Yes thank you, and now to include my parameters do I replace cout << ... (by DeeBoy707)
Need Help getting Output to Display
 
I can answer the questions and get their output but I can't get beyond "Tracking Number" in the voidprintList(NoahsArk* Head) to display. I'm trying to get the ...
[15 replies] Last: The animal type has to be a character array What does that mean? Do... (by AbstractionAnon)
by Athul
Efficient coding ?
 
Hey i recently made a small code to do some basic addition and multiplication . Can you guys point out how to improve the code. #include <iostream> us...
[3 replies] Last: efficient (enough) In a word, 'sufficient'. (by closed account 48T7M4Gy)
Getting the Number of characters from a text file
 
ok I have a text file with thousands of words, A new word on every line, How do I count every character (no whitespace) in the file?
[1 reply] : Short of using a pencil and paper as the answer I imagine you could wr... (by closed account 48T7M4Gy)
by Athul
How to repeat an if statement
 
Hey , I stated coding 4 days ago and i thought i would write a small code . I want to repeat the if fuction if z != 1 or z != 2 if ( z == 1 ) { ...
[4 replies] Last: Thanks guys i was able to write my program as i wished thanks to you :... (by Athul)
by Albos
Switch and char problems
 
Hello guys, how are you doing? Ok, so I have a problem with this code #include "stdafx.h" #include <iostream> using namespace std; int main() { ch...
[11 replies] Last: Good to hear :) Well in terms of the OP arriving at a solution - b... (by TheIdeasMan)
by kugen
Using switch statement to create a program that total up remainder when divide by 8
 
Currently my code is not working, Im trying to count the total of each remainder from the 20 numbers user inputs. How shall i improve it so that i can total the...
[11 replies] Last: Thanks for the advise. ill keep that in mind. And i will try to improv... (by kugen)
Hang Man Game
 
Hi! Could someone help me find the logic error in my functions? I don't think its the boolean, but I could be wrong. I have fiddled with the other quite a bit, ...
[1 reply] : This will not work. if (secretWord == guessTemplate ) You need to u... (by Thomas1965)
by baluu
double use of arrow pointers
 
Hi all, I am trying to understand LAMMPS Molecular Dynamics package, in it, they use double use of arrow pointers like, lammps->input->file(); Please help in...
[1 reply] : Any pointer is accessed via the -> operator. The struct/class LAMMPS... (by coder777)
Random Number Generation
 
Write your question here. #include <iostream> #include <iomanip> #include <cstdlib> #include <cmath> using namespace std; int main() { int i,...
[2 replies] Last: sorry. I am supposed to create a program that will randomly generate 5... (by bkoertje)
by S879
Please help
 
What will be a c program to find the sum of the following series (x/1!)+(x^2/2!)+(x^3/3!)+...nt... term? Please help me
[1 reply] : Hi, Firstly, can you explain what the little math symbol "!" does in t... (by Naughty Albatross)
Why is it outputing a weird number?
 
Thanks. Done
[5 replies] Last: Good to hear :) (by Naughty Albatross)
Using Switch to total the cost
 
Hey guys, I need a quick lesson and help on why my program isn't working as I want it to. I am practicing using switches and trying to total the cost of items t...
[2 replies] Last: Albos, Thanks, that did the trick! :) (by MisterTams)
July 2016 Pages: 1... 1011121314... 30
  Archived months: [jun2016] [aug2016]

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