Beginners - December 2012 (Page 5)

need some explanation
 
hello .. can you explain what would happen here in this program please ? ....... using namespace std; int main() { int x, y, i, power; i = 1; power = 1...
[2 replies] Last: thanks all for your help :D (by bgnr boy)
converting string starting with zero to int
 
My overall goal in this was to convert binary strings to integers, but now i am interested in also learning stringstream. After looking around i found the meth...
[3 replies] Last: [quote=metulburr]The only problem i found when i was trying to use it ... (by Chervil)
resizing images
 
i am trying to resize an image useing this function: My_Image scale_image(My_Image& image) { My_Image scaled_image; int new_w(0); int new_h(0...
[8 replies] Last: got it working. after what athar said i look at the other parts of my ... (by maxaction)
Creating header file
 
Hello, This is Nithish I am new to cplusplus can any one help me here how to create header file in code blocks.
[1 reply] : this guy explains it via video in code::blocks http://www.youtube.com/... (by metulburr)
Codeblocks dosent work with C++11
 
So the code is this: int number = 123; string text = to_string(number); number = stoi(number); but it says that to_string and stoi are not decleared in this ...
[2 replies] Last: currently Arch has the newest at 4.7.2, and ubuntu default is 4.6.3, b... (by metulburr)
strings as parameter/argument
 
I am a c++ beginner and I don't know if strings can be used as argument, if yes then please give any easy example?
[4 replies] Last: @ NeeteshDad: please don't PM any one person - keep it on the forum so... (by Catfish3)
by nasser
VC++ 2010 express
 
how to add a library in VC++ 2010 express
[2 replies] Last: Add the library name to linker input or use a Microsoft specific #pra... (by modoran)
by nasser
just a simple question
 
can anyone tell me what's the best complir for C++
[3 replies] Last: When you say which is the "best compiler", I assume you meant IDE. The... (by jumper007)
Pushing a Beginner in the right direction!
 
I am fairly new to c++ as a language, and programming as a whole. I was wondering if anyone had any tutorials, pdfs of books, or any media that they could think...
[3 replies] Last: I am an advanced user of C++, and the point from which I started was t... (by jumper007)
sync() and flush(), usages?
 
This is part of a bigger program, but essentially, what's happening is that "stringB" isn't being allowed to be written properly. After I type in 10 characters ...
[2 replies] Last: Very interesting! Thank you for your informative response! If cin.read... (by drognisep)
check OS type
 
How do you check what OS you are on via C++. I came across a few answers say to check the environmental vars, the only env vars i saw that both linux and window...
[no replies]
Custom assignment to lvalue of overloaded [] (array) operator
 
Hi I'm currently trying to learn C++. I'm at the chapter on operator overloading and I have a question. I've implemented a custom array class, MyEvenArra...
[4 replies] Last: Cubbi, yeah, that was more or less what I meant when I said "I could h... (by janetmweiss)
by COM314
A good way to clear the screen
 
I'm working on a rock-paper-scissors game and I'd like to have the screen clear every time a new match starts. I've heard that system("CLS") is a bad thing to u...
[1 reply] : You can check this article for other ways to clear the screen apart fr... (by Hippogriff)
If statement help.
 
What is the proper form of the if statement? if statement or if (statement) Also, what is better? if (statement == 1) cout << ""; cin.get(); ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/control/ (by closed account 18hRX9L8)
by Pebble
Sales_item.h
 
I've just started learning C++ using C++ Primer 5th edition. When i try to build the following program: #include <iostream> #include "Sales_item.h" in...
[2 replies] Last: I'm currently using Codeblocks/Mingw. After another search session i'm... (by Pebble)
string
 
I am trying to initialise a string ive put #include <string> at the top however in the int main() section I try to initialise a string like this string bl...
[1 reply] : Do you also have the std namespace included somewhere? You will eithe... (by Hippogriff)
by Kovs95
Dungeon Crawlers
 
Hi! I'm creating a dungeon crawler game. I created a 2d array called grid . I want the player to start at the top left corner so I declared two variables "x...
[2 replies] Last: Thanks! I forgot to delete that! My grid keeps appearing as a straight... (by Kovs95)
Allowing an .exe to run only once at any one time
 
Hello all! Ok I am completely new to C++ (as in this week) and need some help with this if possible. Below is some basic code taken from Dev-C++ which jus...
[3 replies] Last: "gadget50" Being new to C++, I have no idea what any of that answer ... (by metulburr)
Which container is most efficient both for iteration and key-value access?
 
Hello, I have a veriable number of pointers that point to instances of a certain class. Each instance has a unique ID, and it has to be possible to access al...
[9 replies] Last: :) One hell of a game with different objects 60 times per second. (So... (by Lowest0ne)
by Kosmos
Segmentation fault when declaring std::vector
 
Hello, When I run my program, I get a segmentation fault. This is what the gdb debugger outputs: Program received signal SIGSEGV, Segmentation fault. 0x08...
[5 replies] Last: Athar wrote: It's doing that because you're trying to access an elem... (by Kosmos)
December 2012 Pages: 1... 34567... 65
  Archived months: [nov2012] [jan2013]

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