Beginners - November 2014 (Page 46)

function returning values it isn't supposed to
 
so i have a program that first has a aplhabetType_ value.this can be 26,30 or 40. 26 is basic alphabet,30 has 4 special characters,and 40 has numbers aswell. ...
[7 replies] Last: stdchr is part of the C library. true, but it lives in <cstring>, s... (by PCrumley48)
Text Based Game Help
 
In the main it asks you for your name, then within a class and a function within the class it uses the variable char name which is your name. How do i get this ...
[2 replies] Last: Make name a member variable for storyline1. When you ask the name, th... (by AbstractionAnon)
Linker error, set up correctly
 
Hello, i've been having these linker errors: Error 5 error LNK1120: 2 unresolved externals C:\college\Year 3\Year 3\Semester 1\Programming\Formal report\Grid\...
[2 replies] Last: Thank you abstractionAnon, facedesking right now (by Irishguy95)
so lost
 
I am extremelly new to C++ and I am lost. I have to write a code to take the taxes out of a base pay. Sounds easy but I am doing something so wrong that the out...
[8 replies] Last: Thank You (by Rbilbro)
Array of structs help.
 
Hi, I am working on a simple project that calculates resistance and voltage. I just don't understand what it means by this. "Repeat part 4, except this time, i...
[4 replies] Last: Thanks, I'll mess around with these two to see which one is better fit... (by C add add)
Trouble Overloading Operators: DayOfYear
 
My program has a constructor that takes number 1-365 and returns month and day of year, and another constructor that takes a month and day as parameters and re...
[no replies]
Input into Array
 
I am creating a program to create an array of integers, read in numbers inputted by the user until the user enters a certain number. I would like to output t...
[5 replies] Last: Oh it makes sense now! Thanks Jacob and Andy I will use the code tags... (by fortune500)
Help with Bubble Sort program
 
Hey all. I'm new to C++, and learning about arrays. I've built a program that takes 10 numbers input from a user, and does a bubble sort to arrange them from sm...
[15 replies] Last: in my system (3Ghz x64 core2duo) bubble sort: 16000 randoms in 1.279... (by anup30)
Sort and print highest int inputted
 
i am trying to write an array for a user to input 5 numbers between 0 and 10, store them, and then output the highest integer. this is very urgent so please hel...
[1 reply] : This is not a homework site. We won't do your homework for you. Howeve... (by AbstractionAnon)
by KickAz
Write 10positive numbers and check...but got error
 
Hello, I'm new here..I'm trying to write a program that will do the following: Write 10 numbers and check if the number is positive and if its positive user go...
[3 replies] Last: You could do something like this... cout<<"Enter the number of p... (by wildblue)
by prizko
Equation in C
 
Hey i am new new on this,i am in 9th grade in and i am trying to put a equation in c. Sorry for the english cause I´m from Portugal float n1, y, pair; cout ...
[1 reply] : pair =(n1 / 2 == y) pair =(2 * y == y) What are you trying t... (by AbstractionAnon)
by rrvv
Algorithm cost for recursive funtion
 
so I have some problem to determined algorithm cost of this program int rFibNum(int b, int b, int n){ cout << rFibNum(2, 3, 5) << endl; if (n == 1) ...
[4 replies] Last: Look at the pattern for each time you unravel the recurrence equatio... (by Duthomhas)
Best book for beginners
 
Hello everyone, I am trying to decide which book to learn C++ and would like some recommendations and opinions. I'm not a complete beginner to programming, I ha...
[9 replies] Last: Just to clear up what I said about C++ Primer 4th and 5th editions, af... (by Mechennyy)
comparing strings
 
Hello cpp! I have 3 arrays, each contains 5 values with 3 different datatypes. Int, float and string. I want to print the largest value in them. Now, I ...
[3 replies] Last: Hi /// your line 10 MyNewDataType temp = 0; If MyNewDataType is ... (by closed account SECMoG1T)
by Ned757
Yes/No Qustions code help
 
I'm trying to create a funny program for my friend This is it so far #include<iostream> #include<string> #include<stdio.h> using namespace std; int...
[10 replies] Last: Ohh and I included <stdio.h> because I use getchar() at the last bit o... (by Ned757)
How to delete line after a cin?
 
When the user enters an input, it would show up on the console. How do I go around to making sure that it won't show up? I don't want to clear the entire screen...
[3 replies] Last: Windows-specific, but borrowing from this thread ( http://www.cplusplu... (by Norm Gunderson)
min heap help
 
I am trying to make a min heap that works for sorting whatever it is given in the form of a vector (strings, ints...etc)...right now, my min heap can sort numbe...
[no replies]
How to accept only a single character?
 
How can I get only one character from the cin for a char? char PromptToContinue() { int dobreak = 0; char choice; do { cout << endl << end...
[2 replies] Last: Thank you! If I understand correctly std::numeric_limits<std::stream... (by dividington)
Simple text based game im working on, tell me whats wrong please, it keeps crashing.
 
If you press 1 when it asks you to choose one, then it will say test and crash immediately. What did I do wrong. #include <iostream> #include <string> u...
[1 reply] : change the oldman1() to void. Note that using other types(other than... (by rjvc)
Unused Character
 
Upon compilation I get a warning saying that "variable ‘z’ set but not used". How do I fix this? void num_chars(vector<string> words) { ifstre...
[1 reply] : Why are you initializing z as fin.get() and then assigning it to fin.g... (by disturbedfuel15)
November 2014 Pages: 1... 4445464748... 65
  Archived months: [oct2014] [dec2014]

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