Beginners - December 2014 (Page 7)

by Jun77
got some different errors.plz help me out
 
what is wrong with this code, i am totally confused, i already declared variables in structure, than why it gives me errors #include<fstream> #include...
[2 replies] Last: No brother i didn't use bb-codes . second, i am calling a function th... (by Jun77)
Can C++ do this???
 
Hi there, I'm learning class in C++ I wonder how (if it is possible) to write something like cout << OwnClass ; //like: OwnClass.PrintFunction(); ...
[2 replies] Last: thanx a lot for the quick answer!!! So I need to learn operator overlo... (by skorefish)
Problems with Arrays of Strings
 
I am in some troubles with this part. According to the book, I can read and store data in a two-dimensional array of characters. Here is the example from the bo...
[4 replies] Last: > Never use gets(). Because it is impossible to tell ... Because get... (by JLBorges)
learning to write a function
 
whats wrong with this program... and can we have different variables in function prototype and function declaration???? #include<iostream> using namespac...
[7 replies] Last: thankyou all..... got it :D (by shadder)
by kjellb
Put intergers from textfile into arrays!
 
Im trying to put Intergers from textfile into array, and ive been writing a code for it but only works if i have intergers in textfile and not with characters a...
[1 reply] : you would need to read the file line by line and then check if the val... (by rafae11)
A More efficient way of doing it
 
So I decided to do a program that only converts numbers to roman numerals(I'll probably incorporate both but that's for another time) and I want to ask if anyo...
[3 replies] Last: It is range-for loop: http://en.cppreference.com/w/cpp/language/range-... (by MiiNiPaa)
by Jun77
how can i save data in file using double link list?
 
hi, i have a problem in my code. im trying to make a student report card project using double link list and file handling. but im stuck . i search allot but...
[no replies]
by lays
size_t is unsigned, but built-in subscripts can be negative
 
like title, is that size_t just for built-in arrays? cause pointers can use negative index.
[4 replies] Last: thx alot (by lays)
Class variable naming guidelines?
 
Working with classes here and I feel like the use of the same name in different parts of the code isn't good practice. Some times name is "Name" and other times...
[2 replies] Last: Makes sense and I like your g_ and m_ solution. Appreciate the feedbac... (by CGunn86)
Output won't move across the screen
 
My output of "RIGHT" and "LEFT" won't move across the screen like I want and I have no idea what could be wrong. Can anyone help?? Thanks! #include <io...
[1 reply] : while (count > 15 || index < 70) This statement is false right away... (by shacktar)
Having problems with my cin
 
I'm trying to get back into coding so I'm a little rusty, but anyways my objective is to create just a simple conversation. The problem is that my if second if ...
[2 replies] Last: Ok gotcha that makes sense thanks for the help. (by antoniox3)
bad evaluation of main() return of -1 by OS
 
I'm learning C++ through self-study of the 2012 edition of C++ Primer and the first exercise was to write and compile an application in which the only thing tha...
[3 replies] Last: > The book said I should get an error message when that happens > but ... (by ne555)
Is there a point on deleting memory at the end of a program?
 
If you had a pointer and the it'll be used the entire time, is there any reason to delete it right before the program ends? If I recall, the OS does that?
[3 replies] Last: Wasn't it better storing it on the heap rather than on the stack if yo... (by Delshire)
by Dinot
std::cin not working
 
The following is part of my code which is a solution that i am trying to come up with for one of my book exercises...When i try to compiling this it skips both ...
[5 replies] Last: Try std::cin.clear() ; http://en.cppreference.com/w/cpp/io/basic_io... (by JLBorges)
by b1gzz
Else statement not working
 
int main(){ unsigned int fstNumb = 0, sndNumb = 0; cout << "Choose the first number: "; cin >> fstNumb; cout << "\nChoose the second number: "; cin >>...
[3 replies] Last: Sometimes I can be really dumb ._. Damn. Thanks. (by b1gzz)
by Matas
Array
 
Hello. I have a data array and I need to know all different sums of three elements. How to effect that?
[2 replies] Last: Don't you have any code to show us? With just a question like that, w... (by disturbedfuel15)
by wolfv
C++ library questions
 
I read a few C++ library tutorials. They all describe how to make a library. But I still have some C++ library questions: 1. Can a C++ library have multipl...
[3 replies] Last: I personally found it pretty hard to find example C++ Libraries, and m... (by Spikerocks101)
guys what's wrong with this?
 
merry christmas to all!!! wohoo
[1 reply] : merry christmas! (by rafae11)
Arrays
 
For example, there is a total of 12 months and the user will select the months using number 1-12 and then select the days using number as well in order to view ...
[18 replies] Last: @darkmage06 You could do it this way. [In C++] #include <iostream>... (by whitenite1)
Multiple delimiters in regex
 
I want to print only the strings between the commas and semicolons, for example in str = "word1,word2;word3;" I thought using a regex of multiple delimiters "[,...
[7 replies] Last: Why actually use regex on this task? Isn't it an overkill? Good old st... (by MiiNiPaa)
December 2014 Pages: 1... 56789... 55
  Archived months: [nov2014] [jan2015]

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