Beginners - January 2011 (Page 16)

Which should I use? Is there a difference?
 
So far I've been using this: std::cout << "This statement is becoming raaaaaaaaaaaaaaaaaaather long" <<"so I'll split it into two by pressing enter"; but...
[4 replies] Last: C++ gives you so maaaany choices. I'm not sure if that is good or bad... (by Kieth89)
the if statment is still being printed
 
The if statment that starts on line 33 is being read and printed even though the condition is not being met. I have tried everything even trying to turn it int...
[2 replies] Last: Thanks. I did not see that at all. (by twentfiveu)
rtoi implementation in STL
 
I am trying to study how "rtoi" is implemented in STL. The implementation is as follows: 1. template<typename Ch> unsigned int rtoi(const basic_string<Ch>& ro...
[5 replies] Last: Because there's an old way and a new way. Technically in this case bot... (by wolfgang)
by Elnaz
Problem running open cv
 
Well, I'm trying to use open cv in VS 2010 on Windows 7 64 bit. I've added all the dll and lib files and included the path in system variables but when I hit de...
[1 reply] : Previously, I had installed the prebuilt version of opencv. This time ... (by Elnaz)
by spinno
fighting game
 
Hey so im creating a fighting game in c++ im pretty knew to the program and only know the basics, heres the code so far: if(menu==3){ system("cls"); c...
[1 reply] : The code compiled good, but you left out the closing bracket at the en... (by helpmeagainANDagain)
initialization of static data member
 
//class.h class A { static int a; static int b ; public: static void set(); }; //class.cpp #include"class.h" void A::set() { a=0; f...
[5 replies] Last: guestgulkan, I just got it. I have to declare the static member data b... (by vencent)
Segmentation Fault
 
Can somebody please tell me why I am getting a segmentation fault in the following piece of code, I have marked the spot that gdb is telling me it is occuring a...
[4 replies] Last: Thank you, that worked, and I know what I was doing wrong now. (by dsmo223)
Cannot compile using newly installed wxDevC++
 
So I downloaded the latest version of wxDevC++ and everything seemed to go smoothly. To test to see if it worked, I created a new wxWidgets frame project and...
[2 replies] Last: Perhaps you downloaded the IDE without the compiler? Or maybe you didn... (by Browni3141)
Strings and characters
 
My goal is to get rid of the case distinction, but it outputs: error: request for member ‘compare’ in ‘thestring.std::basic_string<_CharT, _Traits, _All...
[no replies]
How do I convert this basic phyton code to basic C++
 
Hello, I am taking an intro to c++ class and they gave us a bunch of code in Python to convert to C++. Can anyone help me figure it out? Thanks in advance! H...
[2 replies] Last: #include "stdio.h" int main(){ printf("True\n"); } (by rocketboy9000)
by Davud
Multiple variable issue
 
Hello!! I'm writing a little dice game, but I have a problem how I should make the variable layout. The program should show 6 dices' value in some ascii gra...
[8 replies] Last: Solved it! Here is the result: #include <time.h> #include <iostr... (by Davud)
Unhandled exception at 0x77bf158e in Rawr.exe: 0xC0000005: Access violation.
 
I'm trying to write a program for class and I keep getting this error message. I'm pretty new to writing in C, but my program will compile fine, but when I go ...
[no replies]
7 card Poker game trouble
 
I need some help with an assignment for a class I'm in. Here is the assignment: Create a simplified 7 card poker game (cards are dealt once, no replacement...
[1 reply] : Anyone care to help? (by SouShadow)
Sieve of Eratosthenes
 
I'm working through Bjarne Stroustrup's [url=http://www.stroustrup.com/Programming/]latest book (aimed at teacher people C++ from the ground up). Enjoying it q...
[3 replies] Last: I never knew programming could be so violent!...I love it! erase() ... (by declanmcerlane)
Pointer to a vector?
 
I'm having trouble just trying to figure out how to make a pointer to a vector, and being able to use that pointer to access the vector elements. So far I've tr...
[3 replies] Last: you can also call test->push_back(1) ( "arrow" instead of the dot )... (by Bazzy)
expected unqualified-id
 
Hi there I am just starting out in programming and using Both the internet and books to learn C++ this code is direct from book. I am getting the error ex...
[4 replies] Last: hey wolfgang thanks heaps for that as i said that code was directl... (by Harold4964)
by acorn
does this implement a copy constructor correctly
 
i am working on copy constructors now and just wanted to see if i correctly did this. a temporary scope is introduced to make one of the pointers go bad. if im ...
[3 replies] Last: Interesting thanks guestgulkan and pangalactic. thats kind of neat. I... (by acorn)
ifstream
 
Hello. I was wondering if i can choose from a text file with numbers inside the number i want exactly. For example the numbers are in 5 lines.: 5 3 6 2 7...
[7 replies] Last: And how can i do that??? (by rafailos)
Need some opinions and answers about C++
 
Hello everybody, I am advanced in programming (I think.). I have got experience in C#.NET, VB.NET and GML. I started to learn C++ about week ago. Reason that...
[6 replies] Last: Thanks for your help. Actually, One of the reasons that why I have ... (by LoRDMeO)
unexpected output when assigning c-string to c-string
 
here's the code: int main() { char x = "200705241325 C27.5"; BioData Filt; char year ; char month ; char day ; char time ; ...
[4 replies] Last: we haven't "learned" it yet. i know what the string class is, but not ... (by propohetjohn)
January 2011 Pages: 1... 1415161718... 42
  Archived months: [dec2010] [feb2011]

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