Beginners - April 2014 (Page 11)

by bozz51
is this correct?
 
I need a program that prints the sum of numbers up to a 1000 and is divisible by 3 only not four or five. #include <iostream> using namespace std; ...
[1 reply] : (!i % 4) == 0 But which is evaluated first, the 'logical not' or the... (by keskiverto)
Ofstream not creating file
 
I am working on a project. I believe I have fulfilled all of the requirements, but my program does not create a file. I included an ofstream, but no file is c...
[no replies]
I need some help with arrays.
 
I'm making a program where a user inputs candidates names and the amount of votes received. Then I want to output the candidates names, the number of votes, an...
[2 replies] Last: In line 48, you are always resetting the value of percent. So at the e... (by Aceix)
Help with understanding assignment
 
I am not asking for someone to write the code for me for this shell outline of a project assignment, I just don't understand what it is supposed to do? // ...
[6 replies] Last: Everyone interprets differently. Deadlines, stress, and experiences p... (by closed account j3Rz8vqX)
Generate a random number with no repeating digits?
 
I'd like to generate a random number with each digit being in range from 0-9 and not repeating itself. Assume finite length of 4. 4321 qualifies, each ...
[6 replies] Last: All you need is random_shuffle() (or shuffle(), and maybe a good RNG).... (by Duthomhas)
NEGATIVE NUMBERS WITH RAND
 
Write your question here. Why am I getting negative numbers when using the rand function? /* find * * Usage: find needle * * where needle is the ...
[10 replies] Last: Chervil, Thank you for showing me other random number generators. I'v... (by phztfte1)
Console Printing Problem
 
Hello I am using Microsoft Visual Studio 2010 and i have recently typed these codes, afterwards i have launched build and it was successful but when i launch ru...
[11 replies] Last: Thank you very much i have figured it out. (by closed account oyRk92yv)
by danzal
Display problem
 
Now how do i cin the diff and display diff i get error missing argument and idetifier #include <iostream> using namespace std; int main() { ...
[4 replies] Last: God bless you thanks ! (by danzal)
Largest Prime Factor
 
I know this code is not finished, I'm just completely lost on where I go from here. When I debug it. Even if the number isn't prime it adds it to the largest nu...
[12 replies] Last: Doing project euler I see. Well I will advocate using a sieve for the ... (by giblit)
Can the following funtion be written as a constexpr funtion
 
exercise: Would it be possible to define isShorter as a constexpr? if so, do so. If not. explain why not. Is it possible, I dont think so bool isShorte...
[4 replies] Last: No not much, the only thing I have done are a little of structs like a... (by closed account EwCjE3v7)
by Irhcsa
Help explain what this does please
 
Please help me explain why this does what it does. Note I am not using this for anything bad. Learning purposes only. My goal is to find anything I can c++ rela...
[5 replies] Last: If it doesn't have the window's option there might be a GUI option or ... (by giblit)
project attraction
 
Write your question here. project attraction 1.there are six cabins ( from a - f ) ; 2. i need program to ask in which cabin is sitting mike. 3. t...
[1 reply] : http://www.cplusplus.com/forum/general/130359/ <--double post Write ... (by giblit)
by danzal
C2143 error !
 
How do i get it to display my weight and height contents i have a c2143 error ! #include <iostream> using namespace std; int main() { int Wei...
[1 reply] : Line 14 - remove the semicolon after Weight and Height. (by Chriscpp)
by mjatt
help with this error
 
I am getting this error :Access violation reading location 0xabababab. anything wrong with this code??? #include <iostream> using namespace std; #i...
[2 replies] Last: thanx man! (by mjatt)
adding linked lists
 
I am trying to add every node in a linked list together to get a new linked list. My program compiled, but when I tried to execute the add method I got a Segmen...
[6 replies] Last: It crashed with fewer. I haven't tried it with more. I'm trying to co... (by arsonholiday)
using class functions
 
I'm in the final week of my online intro to programming class. I haven't had any issues all semester, which is good because my professor does not help his stude...
[2 replies] Last: Wow. The professor specifically told us to add it to the project. Than... (by rachelcmorgan84)
reading character array and translating
 
So I'm trying to make this code work, and so far the code I have, no matter what I enter I receive my debug error code: Error: Invalid characters encountered T...
[6 replies] Last: The line 2 of the first code: #include <string> Lets make a use for... (by keskiverto)
by Subo93
2D array find winner and print it..
 
I want to find the winner and print the winner's ID.Here i have tried to get the maximum sum But it doesn't outputs the maximum sum. can anyone show me how can...
[2 replies] Last: The other problem you're going to have is that your array bounds and t... (by AbstractionAnon)
by amr92
stuck with defined function
 
hi, i have small proplem can someone try to fix it, it is neccesary to keep the function before int main() ? #include <iostream> #include <cmath> u...
[4 replies] Last: it is neccesary to keep the function before int main() ? No it's n... (by CodeGoggles)
removing characters from a string
 
I wanna delete the vowel character from my string.. like if the input is apple the output should be ppl, another input for example saad the output should be sd....
[4 replies] Last: Use remove_copy_if() to do the dirty work: #include <algorithm> #... (by Duthomhas)
April 2014 Pages: 1... 910111213... 67
  Archived months: [mar2014] [may2014]

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