General C++ Programming - August 2012 (Page 11)

how would i attach two images together using nodes?
 
Currently I am trying to make a 2D tank scroll-er and I have two classes at the moment one for the player and one for the turret, each has its own image and oth...
[3 replies] Last: In that case, just make a "Tank" class that contains a body and a turr... (by firedraco)
by devync
Trying to set up my classes properly, but I can't get them to work together.
 
ok, so I know there is inheritance and friend that I can use on a class to kind of link two of them together. From what I understand inheritance is an extension...
[3 replies] Last: This is what I tried just now with friending the gameboard with player... (by devync)
by YGAME
need help for this qestion
 
hello, I'm a student and i got this question in my book ,please help. How many times does the following for loop will run for (i=1; i<= n; i*2) { ...
[6 replies] Last: Are you sure about the code you provide? Your increment statement mer... (by doug4)
Initializing an array of classes in an initializer list.
 
I was just in another thread (http://cplusplus.com/forum/general/77527/) and came accross a problem in my answer that I'm not sure how to get around. The follo...
[3 replies] Last: I'm still on VS2010 so no C++11 here. Thanks for the info. (by Stewbond)
by timlyo
Whats Wrong With Conio.h?
 
I have heard many people say not to use the library "conio.h" however none of them have really given a sufficient explanation as to why I shouldn't.
[1 reply] : It's non-standard. Many modern compilers don't have any such header. T... (by Moschops)
C++ vs. C vs. C# (1,2)
 
I am new to programming, and before I go on I would like to know whether C, C++, or C# would be better for me to learn. Thanks for the help!
[20 replies] Last: Maybe Mono's Windows.Forms implementation is relatively new (I wasn't ... (by chrisname)
by RyanM
Open a folder / change directory
 
My program creates something that looks like this in the directory it is being run from: /current_directory + file 1 -> Contains list of folder names + ...
[6 replies] Last: Thanks everyone. (by RyanM)
scanf!!!!!!!!!!!!
 
#include<stdio.h> #include<conio.h> main(){ int i=1; int a=2; clrscr(); if(scanf("%d",(i==3)>&a)) { printf("%d\n",a);4 } } Can anybody explain ...
[1 reply] : The scanf function returns an int. Zero is taken as false, non-zero as... (by Moschops)
by RyanM
Extracting Strings
 
If you have a string variable that contains the following: <text> - <text> - <text> How do I extract the three different pieces of text? The key is th...
[2 replies] Last: Thanks Duoas! :D (by RyanM)
by leoo
Getting last number of a integer?
 
Hey I have a question and a problem. I'm counting frames in my c++ code, 1 frame = 0.01 second usually. Between ACTION and ACTION2 there is about 72 frames ...
[2 replies] Last: I just loop variable++; In a function that loops. I've never used rin... (by leoo)
Dictionaries, Restricted templates, Decorators and Events in C++
 
Hi all, This is intended to be a discussion rather than a question; all opinions are welcome, and there is probably no best answer. C++ is an efficient langu...
[2 replies] Last: How to efficiently index (linearly or not) objects of DIFFERENT types... (by Cubbi)
output stream
 
i am making my own c (no c++ material so that it can work with any c-based language) header file and the next thing i want to make for it is an output stream fu...
[7 replies] Last: thank you (by Aramil of Elixia)
Help
 
Does anybody have any idea on what's wrong here? In function `int _mangled_main()': expected primary-expression before '.' token [Build Error] [ma...
[2 replies] Last: Ah stupid mistake, thank you (by robkavanagh)
by anuk06
I want to creat a program in c++
 
I am trying to create a small replica of bank but with little difference, I want to first input 5 or more names that can be saved on different locations, but th...
[19 replies] Last: thanks @Moschops I have been doing it completely wrong but now I won't... (by Raman009)
How to take console data into file?
 
i was working in android ndk and found that the following function int err = service->dump(STDOUT_FILENO, args); print the dump of service on console but i...
[1 reply] : i think int err = service->dump(STDIN_FILENO, file pointer to open fi... (by Tarun Batra)
Event handling
 
I know c++ doesn't have event handling so I was wondering is it possible to make a program that alerts you when another program is started like skype or somethi...
[6 replies] Last: What's the point of spinning? You need a way to wait until the event i... (by kbw)
Read value from a file and store them in array
 
I have this text file which contains values of 1s and 0s only. I need to separate the 1s and 0s and store them in an array. // My initial solution file...
[4 replies] Last: vector<int> zero; int num while( file3 >> num ) { if(num == 1) ... (by projectUser)
overloading +=
 
Hello, Please hele me for c++ programming. >"< 1. How I can overload operator+= member and non-member? class Times{ private: int hour; int min...
[3 replies] Last: All non-primitive operators are functions! ¿How other did you think t... (by viliml)
hi guy need help with 2 programm please help
 
hi, i m new at this i got a assignment to submit with 2 questions and i don't know how to start or do it can u please help me! here are the questions 1)Des...
[4 replies] Last: so have you started coding it? (by iantac)
My Program
 
Little help. My program works flawlessly except it wont perform the calculation when "m" for married is entered. #include <iostream> #include <iomanip> #incl...
[15 replies] Last: Many Thanks to @ne555 and @volatile pulse! A single semi colon has cos... (by rynzor6)
August 2012 Pages: 1... 910111213... 31
  Archived months: [jul2012] [sep2012]

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