Beginners - July 2013 (Page 34)

I don't know what the problem. Can't detect the error.
 
Help me solve this error please #include <iostream> using namespace std; enum days {mon=1, tue, wed, thu, fri, sat, sun}; void main() { ...
[15 replies] Last: you're welcome, thx for the link... checking it now... (by chipp)
Pointers
 
For those of you, including myself until very recently, who are having a hard time understanding pointers, I recommend reading "Beginning C++ Through Game Progr...
[1 reply] : I agree that pointers are hard to understand for beginner programmers.... (by MatthewRock)
fstream
 
I have struggled with this for a while, and I decided it was time to seek help from this splendid forum. Here's my question: How can I utilize fstream to ...
[4 replies] Last: > Could you provide example code of setting and getting int values fro... (by JLBorges)
Errors in my program
 
Anyone knows how to fix this error: expected unqualified-id before { token. #include <iostream> #include <conio.h> using namespace std; int main(); { i...
[11 replies] Last: Here's an improved version (with a confirm check) #include <iostrea... (by TrulyRazor)
C struct
 
Consider this code: struct names { int x; }; Initialize a variable of struct names: struct names namesVariable So does it mean that struct names...
[2 replies] Last: as far as i know, no. struct create new data types, but, in case of ... (by chipp)
Storing input data on an array
 
I'm working on a program that finds the average of four numbers, so that they can be stored on an array. The program is complete, but with one fatal flaw: I thi...
[12 replies] Last: Yes, that's still an array. (by TrulyRazor)
return to the beginning of a do-while loop after exiting It.
 
Write your question here. Hi. I'd like to know how I could return to the beginning of a do-while loop after I've exited It without using the goto statement or ...
[4 replies] Last: Thank you all. It's clear now (by reprovo)
by Sorezz
Find Frequency C++
 
the negative value not count properly. pls help. Thank you. #include <iostream> using namespace std; void main() { int a = {1,2,2,2,3,3,-3,-2}; in...
[2 replies] Last: Thank you very much. (by Sorezz)
I keep getting and error when I try to use ostringstream os;
 
Thank you. I just restarted my computer and poof!! It works fine. Thanks for your time
[1 reply] : Well, I copy+pasted your code and compiled it myself and got no errors... (by Zhuge)
SFML RenderWindow question.
 
I can't figure out how to draw stuff from seperate classes for example: I declare the window in main() I make a class and header file named menu. I make the def...
[1 reply] : You don't have any code, so I can't give you specific advice, but if y... (by Zhuge)
by Zexd
wchar_t
 
I was just wondering, why doesn't this print UNICODE characters. I expected loads of them, but it just printed normal ASCII characters... #include <iostre...
[2 replies] Last: @OP to let wcout print out wide characters, you need to imbue it with ... (by Cubbi)
project eulor 1
 
http://projecteuler.net/problem=1 I did problem 1 in python and got the correct answer, 233168. metulburr@ubuntu:~$ python3 Python 3.3.1 (default, Apr 17...
[1 reply] : i figured it out. I had included 1000 in the for loop, whereas python ... (by metulburr)
Tic-Tac-Toe program not working :(
 
As the title says, my Tic-Tac-Toe program does not work. Could anyone take a look at my code and tell me why? The compiler says that, in the winner() function...
[4 replies] Last: I thought that when you used the plus sign with strings you added the... (by AbstractionAnon)
Question about simple Java program
 
Write your question here.
[3 replies] Last: Just going to take your advice and post in the Lounge, thank you! Mark... (by GMPoison)
overloading operators
 
const MyClass MyClass::operator+(const MyClass &other) const {.....................} Please can someone explain to me in very simple words...why the last t...
[4 replies] Last: I understood that LB ;) (by donvigor)
by xpg94
String swapping
 
I should write a code that takes a name and a last name from user,and than outputs that full name reversed, like that: John Smith -> htimS nhoJ But I get ...
[4 replies] Last: Thank you very much. And by the way,for loop goes like this: for(int i... (by xpg94)
errors in variables
 
I don’t know what the heck is going on admittedly I have been drinking a lot of coffee however that still does not explain why this code is not working this i...
[8 replies] Last: got it figured out thanks guys. (by smithdj36)
Feedback on beginner math program
 
If this is the proper place to ask for feedback on the efficiency of code, then here is a short program I wrote today. I just started C++ today, and have no oth...
[2 replies] Last: in your code,can delete the goto statement if you use switch instead... (by ar2007)
calling one member function from another
 
How do you call a member function from another member function? My first thought would be this->member_func() , but htat gave an error, then i tried Basic.pri...
[3 replies] Last: Line 21: test_prints is not a member of your class. It should be: v... (by metulburr)
Output of program
 
I am new to c++. Can someone tell me the flow of the program. #include <iostream> class A { public: A(int n = 0) : m_n(n) { ...
[1 reply] : your program counts how many times a copy constructor ana a constructo... (by samarjan)
July 2013 Pages: 1... 3233343536... 53
  Archived months: [jun2013] [aug2013]

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