Beginners - June 2014 (Page 26)

Loading an array
 
Say I have array ={0}; And I have string line1("HelloHello") How could I load/make equal array to the string line1? I tried array={line1} Do I need...
[1 reply] : First of all, if you're initializing an empty array, you can just do: ... (by Kevin2341)
by Jakee
First Program, Please Review!
 
Hey guys so I made a Rock Paper Scissors program, you enter an input and a computer chooses one and it decides who the winner is.I just wanted some input from y...
[1 reply] : int _tmain(int argc, _TCHAR* argv ) That is not a signature for C++'... (by keskiverto)
signed and unsigned types expression
 
I recently researched that it is better to avoid the use of expressions that mix signed and unsigned types because they can give us back unexpected results .......
[1 reply] : Implicit conversions. In your int a {-1}; unsigned int b {1}; auto c ... (by keskiverto)
Problem with dynamic allocation of a struct.
 
The first allocation was working well but when I coded the second allocation, it is showing an error: error C2143: syntax error : missing ';' before '.' (The...
[2 replies] Last: Thanks, it works now! :D (by carlplusplus)
moving a character around a 'board' on screen
 
So basically, I have a 2d Array that is 3x3. I have made it a class called "Board", and the constructor fills it with 'X's. I would like the user (depicted as a...
[4 replies] Last: @a k n, thank you for your help, all's working well now! (by jaybirdthomas)
by h4ever
how to initiate vector & fill values
 
I am using C++03 on Windows. I am making program where I parse command line parameters. I created object where I want to save some informations from the comman...
[no replies]
by mekki
graphic
 
hi, i am about to simulate the solar system - the math is done but i have no idea how to convert my calculations into simple graphic. i tried to find some good...
[2 replies] Last: thx a lot, cheers m (by mekki)
Need guidance for C++ and more...
 
Hello everyone, I really want to jump in C++ and begin programming with that powerful and beautiful language. But first I need to learn how to use it. I'm not...
[3 replies] Last: Thanks a lot for your replies!!! I find "C++ Primer" a very interestin... (by Greenthing)
Subclassing
 
Im having trouble subclassing a dog and cat as children of parent class Pet. I am more used to writing Java and dont seem to be grasping the syntax of how to d...
[no replies]
2 consoles open with one program
 
So i am working on a simple game that is made in the console. it is an rpg. the character is an @ sign and trees are T and stuff like that. i have most all of t...
[1 reply] : RPG.bat start Game.exe start Level_Up.exe and then i sent it to my d... (by Antone333)
codes
 
[2 replies] Last: Hmm - deleting the question isn't very helpful. How is anyone to tell ... (by Chervil)
code works but doesnt perform calculations
 
#include <iostream> #include <cstdlib> using namespace std; int main( ) { double id; string ownerName; string breed; double age; ...
[1 reply] : You forgot to add weeklyFee to the last line. It should be: cout << "... (by Maharaja)
Help with login system.
 
Hi i posted earlier with a login system and now i've improved it but there is still some errors. I wrote this code in my friend's laptop with visual studio 201...
[no replies]
by tdk93
Passing comma separated strings to printf. Discards the second argument, why?
 
Why does printf discard all the arguments except one when separated by commas? For instance the following program gives hello as output. printf("hell...
[1 reply] : You are misunderstanding how printf works. You only give it one string... (by TwilightSpectre)
by h4ever
How to parse each of the command line parameters?
 
I have a class which has constructor to parse command line arguments. I have command line parameters like this: inputfile.png destfile.png (12,14,35)-(13,16,...
[4 replies] Last: I have made it working. Yet I am working on the parsing but I know how... (by h4ever)
by h4ever
How to reference the value "pointed to by pointer"?
 
This is still not clear to me. I have pointer _TCHAR *a; when I am setting it to a = argv ; so I still have reference. So how can I get the value pointer to by ...
[5 replies] Last: Well, great! This helped finally! Thanks for saving me troubles. (by h4ever)
class
 
Having difficulties understanding this codes, can someone please explain to me in detail classPuzzle { public: Puzzle(intnumRows, intnumCols ) { mat...
[1 reply] : I think it defines a board for a puzzle, what it does as far as I can ... (by Serious Sam)
by h4ever
How to convert argument to string?
 
I wonder why I cannot convert the a to string: MyGlobalClass::MyGlobalClass(int argc, _TCHAR **argv){ _TCHAR *a; for(int i = 0; i < argc; i++) { ...
[1 reply] : 1) _TCHAR* is at best a C-style string. Casting it to a string will no... (by Zhuge)
Coding
 
void
[1 reply] : Orientation() : delRow(0), delCol(0) {} Constructor which takes no ... (by MiiNiPaa)
How to install the latest GCC 4.9 compiler with C++11 support on windows
 
I downloaded the latest release files from official gcc site to use the latest c++11 standard. I got 4 files in total which includes gcc-4.9.0.tar.gz gcc-4.9....
[1 reply] : GCC is Linux program. You can download Windows version included in Min... (by MiiNiPaa)
June 2014 Pages: 1... 2425262728... 48
  Archived months: [may2014] [jul2014]

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