Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
~19.4K People Reached
Favorite Tags
Member Avatar for ~s.o.s~

Hello to all programmers out there. Considering the growing request for practice problems by the beginners, we ( Me, Joey, Niek, Aaron..) have decided to start a sticky which will host some common practice problems which would help the beginners in understanding the programming concepts in a better way. (Did …

Member Avatar for gyno
22
7K
Member Avatar for twek

title is self explanatory how do i convert it to a std::string? all this LP stuff makes my brain hurt...

Member Avatar for easysir
0
3K
Member Avatar for varunrathi

Can anybody help me with permutation in c++. say if the entered string is "stop" then there must be 24 (=4*3*2*1) different words made by the letters s,t,o,p. Similarly if the entered string is "abcde" then there will be 120 (=5*4*3*2*1) different words made using the letters a,b,c,d,e. Please Help. …

Member Avatar for richieking
0
911
Member Avatar for mark0420

plz teach me how to create a role playing game using c++ or any programming language?

Member Avatar for vxp
0
276
Member Avatar for serkan sendur

is there any vay to access iterator's index value without using another variable in the for loop?

Member Avatar for guest7
0
175
Member Avatar for lotrsimp12345

I understand the concept but i don't know when to use and what my teacher expects when he says overload certain operators.

Member Avatar for lotrsimp12345
0
179
Member Avatar for CPPRULZ

So when two objects are declared say class shoe shoe1 and class shoe shoe_copy and then shoe1's variables are set, if the line of code: shoe_copy=shoe1; what would that be doing? After all what is the real data structure of the objects of class shoe?

Member Avatar for MMahmoud
0
143
Member Avatar for jraven1

Hi, I'm having problems checking whether a string is an unsigned integer. The code I am using only checks the first character of the string, so "a1" would return false, but "1a" would return true. Any ideas where I'm going wrong? [code] bool checkUnsignedInt(string *str) { unsigned long value; stringstream …

Member Avatar for ArkM
0
249
Member Avatar for titosd

Hello, I have a question, How I can write a function that return 2 values. the function should take 3 numbers and do between the first and the second number an arethmetic operation and check if the result will be the third number, if yes the function return 1 and …

Member Avatar for death_oclock
0
166
Member Avatar for minas1

Well my main() function has become a mess... What should I do next time to prevent this? [code="C++"] int main(int argc, char *args[]) { srand((unsigned)time(0)); if(!init()) return 1; atexit(cleanup); // to cleanup the surfaces // load images background = loadImage("background.jpg"); message = loadImage("play_again.jpg"); youWinMessage = loadImage("you_win.jpg"); youLoseMessage = loadImage("you_lose.jpg"); start: …

Member Avatar for Comatose
0
203
Member Avatar for Phil++

What I am trying to do is change the cin >> varible; into something different so when I find it easier when I code. The line that I am changing it to is input (varible); i am using this: #define input(i) cin >> (i); it works, however it will only …

Member Avatar for minas1
0
116
Member Avatar for vandenzergen

Hello everyone, I really want to know what should I do first in making games using c++. We all know that c++ is the most widely used programming language in making games. But, there is still things which are not clear to me as of now. I'm still a newbie …

Member Avatar for vandenzergen
0
109
Member Avatar for minas1

[code=C++] #ifndef DARK_OBJECT_H #define DARK_OBJECT_H #include "DarkGDK.h" namespace DarkObject { class Object // abstract { public: Object(); virtual void x() = 0; protected: int imageID, spriteID; }; class Rect2D { public: Rect2D(int x, int y, int width, int height): x(x), y(y), width(width), height(height) {}; int GetX() const {return x;} int …

Member Avatar for minas1
0
83
Member Avatar for watersnow14

Hello. My first thread here @ daniweb. Im stuck on some source code. I am trying to create a small program that allows user to input '1' or '2' for class selection on an airplane. 1 for first 2 for economy. the plane capacity is 10, which is also the …

Member Avatar for AmyH2008
0
281
Member Avatar for riahc3

Is there a good webpage that explains how to use rand() and srand() correctly? Overall I need to learn how to generate a number between 0 and 3.

Member Avatar for Narue
0
215
Member Avatar for g_loughnan

Hi All, I'm trying to figure out how to pass an object to a function by constant reference. If I write a single class, can I write a function in this class that accepts an object of this class by constant reference? If so (or in any case) how does …

Member Avatar for StuXYZ
0
609
Member Avatar for ALAZHARY

Hello, everybody. first, look at the following code: [CODE]#include <iostream> 1 using std::cout; 2 using std::endl; 3 using std::cin; 4 5 double* treble(double); 6 7 int main(void) 8 { 9 double num = 5.0; 10 double* ptr = 0; 11 ptr = treble(num); 12 cout << endl 13 << "Three …

Member Avatar for ALAZHARY
0
644
Member Avatar for minas1

Hi, I'm studying operator overloading through [B]C++ the complete referece[/B] and I've got some questions. In the book, the author writes this: [code=C++] loc loc::operator++() { ++longitude; ++latitute; return *this; } [/code] This creates a new object and returns it. [B]1.[/B]Wouldn't it be more efficient to return a reference? [B]2.[/B]This …

Member Avatar for minas1
0
161
Member Avatar for Tank50

Hi Guys Most of time iam interest do a programming using C# language,but I got a project for PDA,so I hope to developed it using C language,Iam new to C language and ,what steps i have to do learn C language.Starting from first i think its time wasting,so what is …

Member Avatar for William Hemsworth
0
141
Member Avatar for dapcigar

I've been trying to convert my Modular programming code from array to link list.. the whole program is kinda messy now.. could anyone help me figure out what problem am having with the code? PS: am using Vc++6 to compile... Thanks in Advance

Member Avatar for minas1
0
85
Member Avatar for bf2loser

I'm getting an unresolved symbols linking error with this code, the cpp files compile successfully separately, I just can't build the solution and run it. any ideas? header.h [code=c++] #include <iostream> #include <string> using std::string; using namespace std; class Double { private: double dub; char str[50]; public: Double(); Double(char s[50]); …

Member Avatar for bf2loser
0
201
Member Avatar for minas1

[code=C++] int MAX_NUM = 600851475143; int max = 0; vector <int> ints; for(int i = 1; i <= MAX_NUM; ++i) if((int)MAX_NUM % i == 0) ints.push_back(i); cout << "size = " << ints.size(); [/code] I get 0. Something is wrong. I get 2 warnings: warning C4305: 'initializing' : truncation from …

Member Avatar for Alex Edwards
0
121
Member Avatar for dblbac

i was given this question by my instructor and i am completely in the dark on what to do. i have been trying to figure out what to do but couldn't find anything in the book that really explained it. any help with this would be greatly appreciated. explain what …

Member Avatar for minas1
0
138
Member Avatar for elsa87

please help me write a function which will return the last element in an unsorted list. the prototype of the function should be ItemType ReturnLastItem(); we should assume that the list is not empty ans it shouldnt change after the program is executed.. pleeeeeeeeease help me

Member Avatar for Narue
0
141
Member Avatar for davids2004

I am trying to write a program that can be used to display two random numbers to be added together. This program should wait for the answer to be input. If the answer is correct display a statement that says that is correct. If the answer is wrong it needs …

Member Avatar for davids2004
0
400
Member Avatar for number87

ok basically what my program is about. I am to create a program that allows users to input aircraft/cargo details, add the cargo to the aircraft(up to 20), and a function to display all the cargo on that aircraft. So the main problem i am getting is with the listing …

Member Avatar for minas1
0
120
Member Avatar for insertnamehere8

Hi. This is for a phonebook assignment. Part of the assignment involves searching a 2D array. This is the function that reads the phonebook file. [code] void getData(char name[][NAMESIZE], char telephone[][PHONESIZE], char zipcode[][ZIPSIZE], char address[][ADDSIZE], int& size); ~~~~~ void getData(char name[][NAMESIZE], char telephone[][PHONESIZE], char zipcode[][ZIPSIZE], char address[][ADDSIZE], int& size){ int …

Member Avatar for insertnamehere8
0
215
Member Avatar for minas1

Hi. I made some headers I want to include in every project from the include directories. So I'll be able to do [I]#include <hello.h>[/I] instead of [I]"hello.h"[/I], and I won't need to place them in the same directory every time. So I did this: [IMG]http://i38.tinypic.com/2n1bdj8.jpg[/IMG] [IMG]http://i34.tinypic.com/33a4d1g.jpg[/IMG] but it doesn't work. …

Member Avatar for cikara21
0
233
Member Avatar for minas1

Hi. I'm trying to overload +=, -= and *=. [code=C++] /*error C2297: '+=' : illegal, right operand has type 'Matrix *' error C2114: '+=' : pointer on left; needs integral value on right*/ Matrix* Matrix::operator +=(const Matrix *const m) { if(x == m->x && y == m->y) myArray::Add(ppMyArray, m->ppMyArray); return …

Member Avatar for ArkM
0
149
Member Avatar for minas1

[code=C++"] int x[5]; x[4] = 10; *(x + 4) = 10; [/code] Array indexing has a cleaner syntax but (as I've read) pointer arithmetic is faster. My question is, is it worth to use pointer arithmetic? Is there a noticeable difference?

Member Avatar for ArkM
0
943