Beginners - July 2014 (Page 29)

sum in a loop
 
Hello, I am new to c++ and I am creating a program for postal barcode. Enter a zip, it will convert it to the "high, low" bars in the array. I am having t...
[3 replies] Last: thank you guys so much! Easy fix, sorry for such a n00b question. Nex... (by chwplayer09)
PLEASE HELP!! ID RETURNETD 1 EXIT STATUS
 
Hi guys, so i am making a small program, and there is an error showing "ID returned 1 exit status. This is the small program: #include <iostream> using nam...
[12 replies] Last: yay it worked!! thanks a lot anyway!!! (by ShehabKKhan)
Printing Vectors
 
Hi Gods of C++, I am trying to create a generic print vector function that would be called from main function. The function should be flexible enough to prin...
[7 replies] Last: Thank you soooo much !! :D I'll be back with more questions (by newbieme)
by Ganado
C++ support for string in switch-case
 
Just wondering if there's any plans in later revisions of C++ to include strings as possible cases in switch statements, like in C# or D? I understand that an ...
[5 replies] Last: If (when) your compiler supports constexpr , you could make a hashin... (by closed account z05DSL3A)
Problem with a reverse function in a template class stack implementation
 
this is my stack implementation using template with a struct type node and a class type stack: Stack.h #ifndef STACK_H_ #define STACK_H_ #include <...
[2 replies] Last: Sorry I forgot an instruction in the reverese() function, try this: ... (by djanthony93)
by nvrmnd
Recursive Descent Parsing
 
Hi! i am making my first interpreter of my own language, i am having a problem with the function getValue() I want provide the template argument at runtime, dep...
[2 replies] Last: thanks, i will check those articles out (by nvrmnd)
i wonder
 
i wonder about the book of alex allain entitled "jumping into c++", in chapter 7, he gave an exercises that uses an arrays, but in the book, the arrays is in t...
[3 replies] Last: @chervil hey (by xenovia12)
bracket
 
ive seen this code just now string translateThousand (int thousand_chunk) { if ( thousand_chunk < 100 ) { return translateHund...
[4 replies] Last: @coder777 here is the full code #include <string> #include <iostream... (by xenovia12)
Making a console application from xcode work on other computers.
 
I'm having the exact same problem other beginners of programming are having, I can't put this file on other computers and run them. My question is simple; how d...
[1 reply] : If the other computer uses the same (or of same family) operating syst... (by Chervil)
by zeroth
Code example
 
Hi guys, I'm relatively new to c++. I did learn it through some book and using the tutorials on this page, but I need help with something. I need a code of a co...
[3 replies] Last: english is not may native language and i often get failing grades in e... (by xenovia12)
Character Print on the Terminal
 
char x = '0'; cout << "(~0 ): " <<~x << endl; cout << "~(~0 ): " <<~(~x ) << endl; cout << "(0 << 4 ): " <<(x << 4 ) << endl; cout << "(~0 << 4 ): " <<...
[2 replies] Last: May be useful, bitwise operators tutorial; http://www.cprogramming.com... (by Chervil)
Can you inherit from one function to another?
 
Ok I am writing a program and I am trying to figure out can you inhert from one function to another?
[12 replies] Last: @keskiverto your "Encapsulation" is what was in my head but wasn't su... (by Jaybob66)
Print text in console and have use input above printed text
 
If I for instance wanted something like: Health : 0 Armor : 0 Damage : 0 Is there a way I can print that, then have the user able to navigate up and do...
[2 replies] Last: Hm I'll look into librarys. I'm using windows with visual studio expre... (by turtlesavage)
calculate the ages of atleast 2 men- birthdays 28 feb, 29 feb (7 july optional).
 
2 men were born on feb 29, 1984 and feb 28, 1993 respectively. Calculate their ages from current date. (given that 1988 is a leap year). Conditions required...
[2 replies] Last: Can you make this statement for me cond1: (m=2&&y=2000-4n) d<=29... (by Javaspell)
maintain certain string
 
Hai. i just want to know if there is a way to maintain certain character in a reversed string? For example in string "good*morning*everyone". If reversed and th...
[2 replies] Last: Another way is to remove the *s and record their positions, reverse th... (by Peter87)
File IO with depending on switch case.
 
I am new to programming. What I would like to do is once the choice is made and the user knows how much they have saved, that goes into a .txt file stamped with...
[4 replies] Last: http://www.tutorialspoint.com/cplusplus/cpp_files_streams.htm go here (by Sanilk21)
Iteration
 
Good Day! I'm a little bit confused with C++ STL iterators. Is there any way to iterate over containers of different type with the elements of the same ty...
[2 replies] Last: Catfish666 , thanks a lot! (by lionishy)
Advice on saving to file using fprintf vs fputs and saving file on time schedule.
 
I am looking for some advice on saving my file on a time schedule (every X minutes) .. I have included all my relevant code I think re the file. But I would...
[3 replies] Last: Seems that the program buffers the data by default .. and I have deter... (by closed account Lzvqko23)
Please explain this code to me
 
Hello! I am studying by myself and I am so confused as to what these two codes does and how it works? Could someone explain this to me step by step in very s...
[8 replies] Last: Got it!! Thank you so much for your patience, I really appreciate all ... (by NookLines)
Converting string fractions to int
 
uhm, Im trying to convert a Fraction in the form of a string to int but it says: 'Addition' : cannot convert parameter 1 from 'std::string' to 'int' ...
[2 replies] Last: Why not simply do ostringstream num(numerator); num >> n; ostringstre... (by giblit)
July 2014 Pages: 1... 2728293031... 43
  Archived months: [jun2014] [aug2014]

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