General C++ Programming - December 2013 (Page 10)

array={0,0,...}
 
I must be nuts, but does "..." do anything? I could've sworn it did something.
[2 replies] Last: Thanks, I was losing my mind over this. (by sargon94)
need help for one homework, thanks
 
Hi, everyone, i have a homework to do. but, there are always many bugs. Any one can help me? Thanks
[3 replies] Last: I know this is going to be a difficult question, but I want you to thi... (by MikeyBoy)
Moving elements in an array?
 
Hi im trying to get my array to display 5,1,2,3,4 from the original 1,2,3,4,5. void values::movevalues() { cout << "postcondition\n"; int lastElement = ...
[10 replies] Last: Holy crap dude, thank you so much. Now instead of those random numbers... (by moons21)
using logical operators like and or
 
I wrote this program using an online compiler i am getting a lot of errors please help #include <iostream> #include <string> #include <sstream> using n...
[6 replies] Last: You have not used code tags. And you have not told us what the errors ... (by Catfish666)
A program like this can even be compiled! I feel confused.
 
we all know const object need to initialized when defined. But it can be initialized by a variable is really amazing! We also know that an array can be defined...
[6 replies] Last: Thanks a lot, Guys! I think I am more clear now. (by northfly)
overrided the new [] operator (1,2)
 
is there a way to override the new to control how the constructor is called? for example give a class class foo { private: int a, b; public: foo() : a(1)...
[29 replies] Last: Thank you everyone I have created my test application using a serial a... (by vickoza)
C++ Game Scripting
 
Hello, I have a few questions about using scripts in my game engine. My first question is about pointers and whatnot. I prefer to handle all of the "larger" o...
[2 replies] Last: You can use Lua with C++ through Lua's C API. Same thing with Python. ... (by vickoza)
Union operation and statement!
 
#include<stdio.h> int main() { union x { char v1; short int v2; }; union x x1; x1.v2 = 1024; printf("%d\n",(x1.v1 & 0xff00)); ret...
[1 reply] : Only one member of a union is active at a time. After x1.v2 = 1024; ,... (by Cubbi)
initializing struct on declaration
 
Code: struct foo { char label ; int state; } bar = { }; Will the above code ALWAYS initialize to 0 all objects: bar .label bar .state bar .labe...
[5 replies] Last: yes, as I said, I am using a function already the struct is in a heade... (by philonto)
array of objects and inheritance
 
I have Class A as a base class , and Class B , C derived classes from A and there's class D who have a data member (pointer to Array) of type A (Composition) ...
[5 replies] Last: See if you can get any ideas from this: #include <iostream> #include... (by tipaye)
Notepad using a Two-Dimensional Doubly Linkedlist
 
Can Any body do it???? These are Some Info..... Create a notepad that allows the user to write text on the console. For this purpose, the user should be abl...
[9 replies] Last: Your points are valid and true and I agree... I'm not sure his profes... (by Duthomhas)
URGENT DUE TOMORROW C++ Roman Num to Int Program
 
okay so basically i am really close (i think) and the numbers im getting when i run it are weird like for instance i should get back a one if i enter in I or i ...
[5 replies] Last: Don't know if it is too late... how did you do? (by Duthomhas)
Help please
 
I have this interface that I need to implement : Part1 . Implement the class Date defined as follows: /* Date.h */ #ifndef DATE_H_ #define DATE_H_ c...
[1 reply] : Solved the error, but still it executes a blank window with "press any... (by Klagera)
Recursive Fibonacci
 
I am learning recursive functions at the moment and i am really confused. Could someone explain how does the fib-1 and fib-2 variables take the numbers befo...
[5 replies] Last: I got it know! I knew the algorithm was good, but i just couldn't figu... (by antirsi96)
Object Oriented c++ Assignment help
 
Hello guys, I have the Object Oriented c++ programming course and I've been doing great, but there's an assignment with 25 points that I can't figure out , the ...
[3 replies] Last: Also I don't understand why did he put a set function when I am going ... (by Klagera)
EMERGENCY HELP !! Huffman Tree. Totally Confused Where to Start.
 
/** * This method is called to generate your tree. The return type is void because this method simply creates the tree. The other methods * will be used to ...
[5 replies] Last: That is my problem I have no idea how to do it. I have to later store ... (by Jowie Tan)
math problem with boxes
 
An Oriented Bounding Box (OBB) is centred at (3,1) with half-extents of (3, 1.75) and is oriented at an angle of 25 degrees. In the table below write dow...
[3 replies] Last: Duoas just answered your question and all you do is give back a load o... (by Mats)
pointer copying, no malloc
 
I was about to use malloc or strdup to manage this. Finally, I tried this snippet and it works on both my linux and in the more complex code I wrote based on t...
[9 replies] Last: You're welcome! (by MikeyBoy)
Return value not working
 
I have a code in here that u will multiply the number of seat and the number of ticket. i think i got the correct return value but it's still not working when ...
[14 replies] Last: Why did you delete your posts? You've just ruined the value of this t... (by MikeyBoy)
Confusing Classname and fileending
 
Hello Ladies and Gents, i have a MFC projects with some checkboxes. When I double click on some checkboxes in the Resource Window to create an handle like O...
[no replies]
December 2013 Pages: 1... 89101112... 37
  Archived months: [nov2013] [jan2014]

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