Beginners - May 2016 (Page 30)

How to apply numeric value to char variable?
 
int a = 10, b = 11, c = 12, d = 13, e = 14, f = 15; int n = 0; int num; string h; cout << "Enter a number:\n"; cin >> h for(int i = h.length(); i > 0; ...
[2 replies] Last: But how do I use that for char? h returns a char not a string (by mistersunnyd)
Logical for loop errors
 
Hi, I have a program that compiles but I am getting a scramble of numbers as an output. I am supposed to get this exact output: Store Statistics Dept ...
[8 replies] Last: ¿why you aren't indenting your posts? if (meet ) counter ++; els... (by ne555)
DYNAMIC MEMORY ALLOCATION. Something is wrong with the program. It's not giving out the correct output.
 
10 15 17 5 6 The numbers above are stored in a text file called "text.txt". I want to transfer the data in an array using pointers or dynamic memory...
[5 replies] Last: No. It merely appears to work. Everything above one number in file i... (by keskiverto)
Help: C++ and Microsoft Access Database
 
Hello all! I am currently working on a project for class that involves using programs to interact with a database. I have chosen to use C++ (which may not have ...
[11 replies] Last: Sure there is - for example: String ^ CategoryName = reader["Category... (by Thomas1965)
what's the wrong with this code?
 
what's the wrong with this code? I'm trying to cut this one line input string into substrings but when I started with the first substring it didn't work,help pl...
[7 replies] Last: Hi, Just for future reference, please use the title of your posts... (by moonman239)
"expected primary expression before const" and "invalid types for array subscript" errors
 
I have to make 2 arrays and use functions ti input, output, add, and compare them but I keep getting "expected primary expression before const" and "invalid typ...
[3 replies] Last: It means that since maxDigits is a constant you can't pass the variabl... (by jlb)
HELP PLEASE
 
Man i created this program to calculate dB and the price of cables in a house (for a school project) but meters of cables still 0. here is the program. Here met...
[no replies]
Write a main function to create EMP, an array of EMPLOYEE objects
 
Write your question here. int main() { //Write Employee class to create Emp array size of 6 below: cout << "Enter employee details:\n "; for...
[no replies]
Tic-Tac-Toe program using array
 
I made a Tic-Tac-Toe program using 2-D array but it does'nt display the winner. Plz help me. Here is my coding #include <iostream> using namespace std; ...
[1 reply] : I can't read the code that well since I'm reading it off my crap phone... (by Kurisutofaa)
Reducing processing time of two maps
 
Hi everyone I have two maps: Pkt_creatingmap and Pkt_arrivalmap. The number of elements in (Pkt_creatingmap) map is much more than the number of elements in ...
[4 replies] Last: I appreciate too much your assistance.... Thanks again for your notifi... (by ajlahmed)
array referencing within array
 
.
[1 reply] : Do you have a specific question or problem? (by jlb)
I want to read the name (Last, First)
 
I want to read the name (Last, First) for example I loaded Smith, Henry but I use this code is showed"Smith, Henry" #include <iostream> #include <string...
[2 replies] Last: Or you could just skip the leading whitespace if it is present. #in... (by jlb)
Inputting an equation and evaluating it
 
Hello everyone, I'm trying to calculate numeric integrals with Monte Carlo Method. Briefly, it's a method to calculate integrals with random numbers. My assi...
[1 reply] : The searchword is probably "expression parser". For example: https://... (by keskiverto)
Void function
 
Hi, I've been having trouble in applying the void function in my simple program and wanting to avoid using the goto statement. My main goal is when the user inp...
[2 replies] Last: What you want is called a "do while" loop: http://www.cplusplus.com/do... (by Computergeek01)
Very Hard Recursion Problem?
 
Hey, I just had an exam on recursion and the question was much harder than I anticipated. It asked us to write a function called cutAfter7 that "cuts" a number ...
[2 replies] Last: > if each recursive call was testing the number (x/10) > meaning I wo... (by JLBorges)
how to get out a loop after user enter the correct answer
 
Salam, i have a school project to submit by this week, basically my project is about crytographic games where the user input the letter to guess what are the re...
[2 replies] Last: [quote=jolm1x]To my knowledge the break; only exits the if statement, ... (by MikeyBoy)
by enesdl
Floor Plan Program (reading array to vector)
 
Hi guys, I have some homework and I needed some help finishing off the program. I got a good amount done but I am experiencing some issues. **I know ther...
[10 replies] Last: Here's a version using a vector of vectors as MikeyBoy suggested. ... (by AbstractionAnon)
How to wrap integer if greater than a certain number?
 
Program asks for current month, the rainfall and the average rainfall for each of the 12 previous months & puts them into a chart, then you can switch between c...
[6 replies] Last: I was setting currentMonth=7 as an example. Just delete that line an... (by dhayden)
by Nick89
Reading an input C++
 
Hi all, I have a project which requires me to write a program to read a value of LED status on a microprocessor board using C++. I understand how to input...
[1 reply] : This might help if you have an Arduino Uno or similar. const int led... (by closed account 48T7M4Gy)
Multiple inputs in 1 line
 
I'm starting a new project that will solve Sudoku puzzles for me. I just started, I'm curious on how could I get the user to enter input for 9 different variabl...
[3 replies] Last: You can read input to a string using getline(cin, string) function in ... (by jurok85)
May 2016 Pages: 1... 2829303132... 36
  Archived months: [apr2016] [jun2016]

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