Beginners - March 2015 (Page 49)

Not understanding the 'OR" operator
 
I have this simple little program code and I did not get the results I expected. #include <stdio.h> #include <iostream> using namespace std; int mai...
[5 replies] Last: Of course! Thanks so much for seeing me through this "blind" spot. I r... (by James1st)
c++ same but different
 
is there any way to make the compiler thinks that '*' and '*' is different?
[6 replies] Last: [quote=Lorence30] char array = {'*','*'}; if ( array != array ) // ... (by keskiverto)
Sorting a text file
 
My assignment is to read two separate text files(file1.txt and file2.txt) and merge them into a 3rd file(output.txt), then sort the new output file and display....
[8 replies] Last: I extract the data from file1 and file2 into a temporary vector of in... (by benbalach)
Basic tip calculator (input requested)
 
So, I'm new. i just started learning about classes and objects (still not sure how to implement them though.) and this is the first program i wrote with no help...
[1 reply] : 1. How can I make this code reset/refresh so i can enter more than 1 ... (by MiiNiPaa)
C++ Constructors and 2D Arrays
 
Hey guys, I have to create a class to store a string + an int value assigned to the string. Ex : Cat = 6. It must have a constructor which initializes a dynami...
[7 replies] Last: each of the array values points to another array which store the stri... (by keskiverto)
Making Fibonacci/Sequence Numbers
 
Here is what I'm suppose to do: By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previo...
[1 reply] : Use for(int i = 1; i < fibNum; ...) cout the 0 before the loop. Note... (by coder777)
Help for a little program
 
Hi, this my subject : User enters a natural number n and integer numbers a1,a2,a3... an(n<100). Print out the second largest number. For example, the sequence o...
[2 replies] Last: That was that ^^, thanks for the links, i ll try to code with that. (by lucasf100)
Array Question.....
 
I have made this array to ask for an input, but i want what is stored in what's below into an output that looks like this.... for (ctr1=0; ctr1 < 7; ctr1...
[2 replies] Last: Thank you, but I figured it out...I didnt have to comment out line 4 t... (by Jxcorex29)
Comparing String Indexes within a loop.
 
What is the proper way to compare a single string index with the other string index in its proper order in C++? For example: Comparing the strings "Plane" a...
[2 replies] Last: Thank you. I've tried another way but I keep getting a error and not t... (by amikecallies)
Do-while looping help!
 
Hi! I have to make a code that keeps asking the user to guess a number between 1 and 10 until the user enters a 4. my current code isn't working but i'm not sur...
[1 reply] : The return 0 is in the while block. You need to place the return 0 out... (by FirstKoishi)
Pass maze vector to function for reading
 
Hello, I'm working on a maze assignment and need help with passing my maze vector into my placePlayer() function so I can check where the entrance is and place ...
[11 replies] Last: It depends on how you place your player. You could store the player's... (by GRex2595)
Make the user keep quessing
 
I'm suppose to write a code that ask the user to guess until the user picks the number 4. Once the user picks, the number the code keeps looping with the state...
[6 replies] Last: Here you go @niknik2: #include <iostream> #include <cstdlib> using na... (by calisabeth)
by koopey
prime number generator from jumping into c++
 
Hi everyone! Stumbled upon this problem from jumping into c++ that asks to write program to generate prime number. I have already written the code with another ...
[6 replies] Last: @smac 89 thank you for such a detailed response. now everything regard... (by koopey)
Determine the proper nounce in the .txt file input.
 
Hi evryone! I have a problem when i try to solve the exercise of my professor. He request us to determine the proper nouns in the .txt file input and the fr...
[1 reply] : Since you ignore the first words in sentences (in the English language... (by GRex2595)
Checking if input is an integer
 
I have this function int GetIntInput(int min, int max) And I have this code: int GetIntInput(int min, int max) { /* Your code goes here Note: you...
[8 replies] Last: #include <iostream> using namespace std; int main() { int input; ... (by GRex2595)
Variable within while loop
 
Hello, I am fairly new to c++ and am trying to code a FRDM mbed board. My question is how do I define the variable period, and frequency for that matter, to be...
[1 reply] : float period = 0.0; float freq = 0.0; I don't know the volatile k... (by GRex2595)
I cant enter a decimal in a cin without the program jumping to the end.
 
When i run the program i answer the first question with a 0.5 and it just goes to the end of the program and i cant figure out why the program does not accept a...
[1 reply] : It worked just fine for me (I think). Your output looks a little off,... (by GRex2595)
by relgin
rocket performance table
 
how do I get my program to print out a table showing the rockets altitude and velocity for each 0.1 second of the flight. the table ends when the rocket reaches...
[8 replies] Last: If you want a table you need to use loops like fun2code mentioned, all... (by chouhaizi)
Function Operators
 
I have some questions about a homework assignment. If someone could help me answer these questions, but also with an explanation to help me understand, I would...
[12 replies] Last: it is possible do make them do other stuff, things you would not expe... (by Disch)
Encrypting input text file
 
I would like to write a program just for fun. (Inspired by the movie, The Imitation Game) The program will input a txt file, lets say it holds the word "game" ...
[4 replies] Last: no, you would use 'letters' as a pointer or iterator to iterate trough... (by codekiddy)
March 2015 Pages: 1... 4748495051
  Archived months: [feb2015] [apr2015]

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