Beginners - September 2014 (Page 33)

a doubt on const variables
 
lets take const int a=10; as we know during compilation compiler replaces all occurrences of a with corresponding value. so there is no need for memory as ...
[3 replies] Last: > when i print sizeof(a) i am getting 4 bytes. sizeof(a) tells us ... (by JLBorges)
increase terminal window
 
I want to change from 20 steps to 40 by increasing the size of the terminal window. but it doesn't go above 20 everytime i try. How do i solve this? I tried to ...
[no replies]
by moufou
need help with my loop
 
Hi I have a minor(I think it is minor) problem with one of my loop. the loop is supposed to uppercase every letters in the word enter but it stop after one lett...
[4 replies] Last: mmmmm I see, but by saying "I dont want to upset your reasoning about ... (by moufou)
by Kernul
Repetitions of words
 
I found this exercise and I don't know how to continue. Write a sequence of words that ends with **END** on keyboard. Calculate how many times a word is repeat...
[8 replies] Last: Oh great! Thank you! :D (by Kernul)
Bjarne Stroustrup's c++ programming language 4th edition desk calculator example
 
So I've been writing the desk calculator example in chapter 10 of the book, but it won't run because the implementation of the function current(); in the token_...
[1 reply] : It looks like it really missing. Implementation shold be: Lexer::Tok... (by MiiNiPaa)
by Kernul
Find word in a textfile
 
I found an exercise on the internet and decided to give a try. The exercise is this: "Write a modular program in C++ that search in a file strings with the pr...
[17 replies] Last: Oh great! Thank you! Now I understand! :D (by Kernul)
by Chance
Help on price calculation
 
I can't seem to get this code to work out correctly. No matter what value the user enters, it always totals out to $1.41. I understand why its doing that now (I...
[5 replies] Last: Will do. Thank you MiiNiPaa. (by Chance)
Polymorphism
 
Hey guys i used polymorphism and Inheritance but still i van not find any i=usage except that it avoids code duplication .... what else could be the use of poly...
[10 replies] Last: Oh, I see. I automatically read that as Person::read_person, but obvio... (by hyperfine)
by Korcha
PI with infinite series
 
So I have to create a program that calculates pi using the infinite series definition. This is what I have: #include <iostream> #include <cmath> usi...
[2 replies] Last: n begins as an odd number. n gets incremented by 2 each time. n will a... (by Ganado)
by davez
boolean
 
im having troubles on how to understand the bool data type can someone please help me understand it and can you give some sample programs for me to study :D tha...
[4 replies] Last: Thanks ill continue to practice using bool data type (by davez)
Pointers in functions
 
How do I pass a char pointer to a function and write it out. Somethings wrong with this code and I dont know why. Help? #include <iostream> using nam...
[7 replies] Last: Don't forget that you're only allocating space for one character. Use... (by Avilius)
Using array value in a function
 
Hello, I would like to pass an array number into a function. I get an error saying i was not declared. Please explain why what im doing is wrong. Thank you! ...
[6 replies] Last: Lets say that the numbers in a file are 30 11 23 56 45 43 and the fir... (by Zenith1900)
if - else problem
 
Hey guys, i started to program my first app. It is a poker calculator. so briefly, all i want is that when in texas holdem poker i see 3 cards in the center an...
[1 reply] : if (x=card1) this line is assignment not equality (by Yanson)
Input restrictions for specific numbers
 
Say I already have a code for restricting alphabet input from another topic , I want to restrict the input to only allowing certain numbers such as 1 9 14 32 6...
[5 replies] Last: Sorry I was unable to get back to this earlier, I haven't encountered ... (by djninjanz)
by Putler
C++ and Android
 
I need some guidance on how to make Android apps using C++. When I opened up Android Studio (IDE), I was hoping that it would be as easy as writing programs for...
[3 replies] Last: Helios is that project finished? Who is working on this with you? I re... (by Smac89)
by plp384
Used setw(1) on the input of a declared string
 
A program I wrote calls for the input of a single alphabet letter and a single number. A problem I ran into when running the program was that I had to either pr...
[2 replies] Last: Okay. Thank You for the response. (by plp384)
by moufou
just wondering if my program is optimized
 
Hi i'm currently doing a homework(I know that you will not give me the answer nor do i want it and i have finished it). basically my program makes a square with...
[6 replies] Last: thanks for the comments (by moufou)
by gnerpo
store string pointers in map
 
Hi people, here is the code i compile under windows with code blocks and mingw gcc: #include <iostream> #include <vector> #include <map> #include <sst...
[3 replies] Last: Thank you very much! (by gnerpo)
program not breaking when it should
 
I'm creating a game of battleship, and I'm having a problem with my program where it is not breaking when it should. In the section with three for loops that l...
[no replies]
fnction pass
 
is it possible to pass the function into another function and that another function will pass into another function? and will is still work the way it should be...
[2 replies] Last: Function pointers will keep it's integrity no matter how many times it... (by Krisando)
September 2014 Pages: 1... 3132333435... 51
  Archived months: [aug2014] [oct2014]

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