Beginners - November 2013 (Page 32)

if statements not triggering with text strings
 
Hello! I'm having trouble with strings triggering if statements, please help me understand this because I am at my wits end :( #include <iostream> #inclu...
[2 replies] Last: Such a blunder. I must have debugged for hours on this. Still learning... (by kitaboy)
Initialising a 2D numeric array
 
What is the format to initialise a 2D array(numeric) in Turbo C++ and Xcode(Command Line Tool --> C++) ? My doubt arises because, the PC in my school which ...
[2 replies] Last: @keskiverto - Sorry for the mistake in terms. I do that often even th... (by donttrackme)
by mas12
I couldn't solve it in c++ can you help me
 
Write a program that asks the user to prompt an Integer number and then test whether it is Palindrome Numbers or not. The following are Palindrome numbers: ...
[1 reply] : Doublepost of: http://www.cplusplus.com/forum/general/117194/ (by keskiverto)
by w000k
dev c++ no ejecuta codigo
 
alguien sabe porque esta linea hace que mi codigo en dev c++ no corra. factor=mc /pivote; si compila pero al ejecutar me aparece este error. "...
[1 reply] : Check that i and k do not exceed the size of the array. The progra... (by Chervil)
Prompting for array values
 
I found the following code while searching through the forums and I have found that while it works perfectly for displaying the already set values stored in the...
[2 replies] Last: How would I add another sort in there for ascending alphabetical order... (by Opjeezzeey)
by sosscs
while(cin) ! how does that works ?
 
here's a code that I saw and it works perfect but I don't know what does cin doing in this code ? while (cin && more) { testOneNum(); cout << "Mor...
[2 replies] Last: int x; if(cin >> x) In this context it is indicating whether or not... (by Chervil)
by Shery
Function similar to \r
 
I know that \r returns cursor to the start of line. what if i have printed 10 lines with use of \n or endl and i want to goto very first line to renew my print?...
[1 reply] : the only way to do that is to perform terminal and os specific stuff, ... (by nvrmnd)
Bubble sorting Strings with strcmp()
 
Hello everyone, So I'm learning how to use arrays and I was given the task to write a program that declares 10 arrays and asks the user to input a name for eac...
[4 replies] Last: I was able to make the program work using the algorithms library! D... (by Catfish666)
Problems with numbers
 
why does the total only shows the last number? #include <iostream> #include <fstream> using namespace std; int main() { ifstream inputfile; ...
[4 replies] Last: May be make a count variable to keep track of the number of times in t... (by swejnc)
Add two points
 
Hello! I need to write a program to overload +,-,*,++, and - operators to add two points, subtract two points, multiply a point by a constant k, auto increment ...
[2 replies] Last: A less friendly approach has: T operator+ ( const T & lhs, const T ... (by keskiverto)
help with poker game
 
I am working on a class assignment and i need to create a poker game. ive been able to deal two hands but need help creating an array that will work hand in ha...
[no replies]
by enemy
First smaller prime to sqrt(a1)-PLEASE, PANICK!!!
 
Hello! We have to input a number. Then count 5 prime numbers <= it. Then we make array_f made of these prime numbers. Then we input another number, and pr...
[2 replies] Last: Hello! Why is result 19 and not 11 here: (the same tast, fixd some thi... (by enemy)
by dylanv
Passing file names as formal parameters from main to function in another .cpp file
 
I am trying to pass file names as formal parameters to a function in a separate .cpp file where the files will be opened and processed. I am able to open the f...
[2 replies] Last: Thanks for the reply. You're right it works when I stop trying to pas... (by dylanv)
Outputting unsupported symbols
 
Hi, how can i output an unsupported symbol like this: ₡ ? sorry, i know this is simple. thanks a lot!
[no replies]
by jwilt
2D array
 
my output for the main function is not outputting correctly. the first number is "2005398656" when all the numbers in the file are 1-7. the rest of the numbers...
[2 replies] Last: When working with any container, indecies start at 0, and end at their... (by IWishIKnew)
Character Array printing "P<[random_character]"
 
I'm writing an algorithm that finds the first instance of each letter present in a string and then outputs each present letter in an alphabetical sequence. For...
[no replies]
Getline function
 
What's the difference between getline(cin,name) and cin.getline(name,100) are they not the same thing?
[2 replies] Last: Also on windows I think cin.getline() will leave the newline in the b... (by giblit)
Capitalizing the first Letter of each sentence of a String
 
Write your question here. Alrighty everybody, so here is my code: #include <iostream> #include <cstring> using namespace std; void capMyString(char * ptr)...
[6 replies] Last: Alrighty. I changed it really quick. still gives me the same output bu... (by chelseaR)
size of file
 
hi coders, Recently an idea struck my mind to create a file cutter.What it does is to read info from a file and split it into files with specific size and dele...
[2 replies] Last: ok thanks (by cyberdude)
Outputtign Odd numbers
 
I want to output odd number using arrays. I have this solution working, but for general knowledge, can I improve this code more. if I can't, is there another wa...
[4 replies] Last: Not bad home star! Creative thinking, I must say (by fahmankhan75)
November 2013 Pages: 1... 3031323334... 80
  Archived months: [oct2013] [dec2013]

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