Posts
 
Reputation
Joined
Last Seen
Ranked #548
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
98% Quality Score
Upvotes Received
48
Posts with Upvotes
44
Upvoting Members
34
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
5 Commented Posts
5 Endorsements
Ranked #347
Ranked #383
~67.7K People Reached
PC Specs
Dell Inspiron 1525, Ubuntu GNOME 13.10
Favorite Tags
Member Avatar for najiawad0

I'm 11 years old and I'm absouloutly LOVE programming. I'm learning C++, but I heard that C++ is used for creating games. Where can I learn game development online for free.

Member Avatar for NehaPande
0
707
Member Avatar for rfrapp

This problem is to print a square using a number that the user enters, which would be in the center. If the user entered a 5, then the program should output this: 111111111 122222221 123333321 123444321 123454321 123444321 123333321 122222221 111111111 If you're wondering, this was not a homework assignment. …

Member Avatar for pty
0
1K
Member Avatar for najiawad0

Should I get ubuntu on my mac? Is it good for programming? Does DirectX support linux?

Member Avatar for Violet_82
0
262
Member Avatar for yann.bohbot.9

I'm new to C and I'm trying to convert decimal to binary. The result is giving me an inverse number of what's required. I tried to apply modulo on the result like I saw on other forums but I still get the same result. Any help? #include<stdio.h> int main() { …

Member Avatar for Banfa
0
142
Member Avatar for thomas_14

I have a method in foo class that needs to be initialized in my main.cpp and inside another method of foo.cpp. basically my example has a mainPage then will allow to user to do addition or subtraction depends on their choice. after the addtional/subtraction method is done, it will go …

Member Avatar for thomas_14
0
492
Member Avatar for mike_2000_17

Following up on a discussion on [this thread](http://www.daniweb.com/software-development/cpp/threads/470519/looping-using-recursion/), I did some tests on the performance of recursion vs. iteration, and some interesting things happened, so I thought I would share the results. I'm gonna structure this a bit like a lab-report, because that's really the best way to put it. …

Member Avatar for Tumlee
4
662
Member Avatar for yogesh_6

//this is a mine...sieve's algorithm implementation please tell me where i am going wrong...// #include<iostream> #include<vector> using namespace std; int main() { int a,b,p; vector<int> v; cin>>a>>b; for(int i=a;i<=b;i++) v.push_back(i);//inserting all values upto given limit in a vector.. for(p=2;(p*p)<=b;p++) { for(int n=2;(n*p)<=b;n++) { int s=(n*p); v.erase(v.begin()+s);//erase all multiples of 2,3....from …

Member Avatar for Tumlee
0
183
Member Avatar for Seba Sama

Hello, I'm trying to understand some things about derived classes: how to add something "extra" to existing functions in base class. My base class is "shape2D" like a rectangle, 3 functions: set values, calculate, show results. No problem here. Then I create a derived class named "shape3D". Please note the …

Member Avatar for Tumlee
0
348
Member Avatar for Labdabeta

I need to know which of these three copies of code is considered best. I also need to which one is more efficient memory wise and which is more efficient time wise. Thanks: enums [CODE]enum MyEnum{EnumTypeOne=1,EnumTypeTwo=2,EnumTypeThree=4,EnumTypeFour=8};[/CODE] macros [CODE]#define EnumTypeOne 1 #define EnumTypeTwo 2 #define EnumTypeThree 4 #define EnumTypeFour 8 typedef …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for hemanshurpatel

Hi friends, I want to implement code which can take input from some other application. Like say for example ls | less Here, less is the application/utility which takes input from ls via pipe. I want to implement the same in C. I Did following things 1. Created PIPES using …

Member Avatar for Tumlee
0
674
Member Avatar for Pratique

#include<stdio.h> #include<conio.h> void main() { printf("enter number:"); scanf("%d",&n); for(i=1;i<=y;i++) { x++; } t=x; for(i=1;i<=y;i++) { t--; } y=t; getch(); }

Member Avatar for Mouche
0
338
Member Avatar for priyanka.choudhary.90038

Hi, In below code snippet , can anyone let me know how to print the functor value output (3,4,5,6,7) without embedding add function in class. #include<iostream> #include<vector> #include<algorithm> using namespace std; void add ( int i) { i=i+2; } int main() { vector <int> vec ={1,2,3,4,5}; for_each(vec.begin(), vec.end(),add); for (auto …

Member Avatar for richieking
0
252
Member Avatar for jonathan710

// Expect to print values of arr[0] to arr[4] #include <iostream> #include <vector> using namespace std; int main() { vector<int *> ptrList; int arr[] = { 0, 10, 20, 30, 40 }; int * ptrArr = arr; for( int i=0; i< 5; i++ ) { ptrList.push_back( ptrArr+i ); } vector<int …

Member Avatar for nullptr
0
253
Member Avatar for Tyler_1

The title says it all but I am curious if it's acceptable or even efficient for that matter. If others were to read my code or work on a project with me is this generally accepted among others or yourself if you work on an enterprise level? Is this memory …

Member Avatar for Tumlee
0
314
Member Avatar for COKEDUDE

When doing a linked list of chars with just a single character do you think it's better to use pointers in your struct like this? Typedef struct String_Node { Struct String_Node* next; Struct String_Node* prev; int id; char* c; } String_Node_t; Or better to not use a pointer with the …

Member Avatar for deceptikon
0
929
Member Avatar for cambalinho

i know: - &varname is the adress of varname; - *varname is the value of adressed variable. but: void *Vvariant=NULL; friend ostream& operator <<(ostream &os,const variant2 &obj) { os << obj.Vvariant; //how can i get the value of adressed variable? return os; } how can i get the value of …

Member Avatar for cambalinho
0
122
Member Avatar for Learner010

i learned about 1D Array , 2D Array , 3D Array.But today , suddenly my friend asked my a question on "how to access Array Elements". i said "just use array with index".like a[0],a[1] and so on. and then he replied(it seemed that he knew very well about array) "is …

Member Avatar for richieking
0
186
Member Avatar for sahar.97

Write a program with Recursive function that for every step will receive input from a number of until the digits 0 entered. After entering the digits 0 It should be entered into the numbers entering printed in reverse order Track.

Member Avatar for Tumlee
0
174
Member Avatar for VBOI

Here is a function to print my binary search node tree, void printtree(struct node *tree) { if (tree!=NULL) { printtree(tree->left); printf("%s %d\n",tree->word, tree->lineNumber); printtree(tree->right); } } How would I save what I print to a text file???????

Member Avatar for Nutster
0
3K
Member Avatar for VUEKID

I have read a text file to console and printed the file after reading, int textLength=0 int c; int c; FILE *file; file = fopen("ModestProposal.txt", "r"); if (file) { while ((c = getc(file)) != EOF) putchar(c); //fclose(file); } textLength = strlen(c);//get the length of the text How come I can …

Member Avatar for VUEKID
0
174
Member Avatar for lehlohonolo.mohaila

write c++ code that has a function int GreaterThan (int array [], int size, int searchItem). The fucntion should count and return number of elements in the array greater than SearchItem. you are free to generate the element randomly or let the user enter them, the size must be less …

Member Avatar for happygeek
-1
385
Member Avatar for daino

The below code simply reads the string **"This is a test"** from a text file and displayes it on the console. I've deliberately placed an endline at the end of each time the string is loaded to show that the string is all that is passed to '**mystring**' from '**myfile**'. …

Member Avatar for daino
0
214
Member Avatar for smdjilani

i have assigned a value directly to a pointer like *ptr=12; and i have used it,no error came.if we assign like this where the pointer points to?explain me?

Member Avatar for Ancient Dragon
0
168
Member Avatar for logicslab

Dear pals, I installed Turbo c for windows 7 ultimate 64 bit , but it's not user friendly .When it use in full screen the mouse is not working . Any solution for it ? If you know any new C compiler setup let me know. Thanks, Anes

Member Avatar for deceptikon
0
385
Member Avatar for Falcon143

/*Hi, I was trying to optimize my application in C. In that process to reduce the complexity at condition checks which of the below is efficient,*/ if(bFlag1 && !(Var == 1) && bFlag2) //or if(bFlag1 & !(Var == 1) & bFlag2)

Member Avatar for Falcon143
0
175
Member Avatar for lalitha2294

#include<stdio.h> #include<conio.h> #include<math.h>> main() { int k,i,r,n,j,a[100],m,p,b[100],count=0,count1=0,q,w,g,h,l,z,x,x1; printf("enter the length of the data word:"); scanf("%d",&k); printf("\nenter the data word:"); for(i=1;i<=k;i++) { scanf("%d",&a[i]); } r=1; while((k+r+1)>pow(2,r)) r++; printf("\n r=%d",r); n=k+r; j=1; m=0; for(i=1; i<=n; i++) { p=pow(2,m); if(i==p) { b[i]=0; m++; } else { b[i]=a[j]; j++; } } printf("\n INTERMEDIATE CODE …

Member Avatar for lalitha2294
0
151
Member Avatar for Labdabeta

Hello, I was just noticing that the 'const'ness of references often causes me to rewrite a large chunk of my code with pointers. For example if I have a class that needs access to a large amount of data from another class I would love to use a reference. However …

Member Avatar for mike_2000_17
0
402
Member Avatar for 2384443

plzz help me with this program #include<iostream.h> #include<conio.h> int sum(int s); int sum(int x); int sum(int j,int k); float sum(float p,int q); float sum(float y,float z); void main() { cout<<sum(0)<<"\n"; cout<<sum(3)<<"\n"; cout<<sum(6,7)<<"\n"; cout<<sum(5.5,8)<<"\n"; cout<<sum(4.9,3.5)<<"\n"; getch(); } int sum(int s) { return s; } int sum(int x) { return x; } …

Member Avatar for richieking
0
137
Member Avatar for Abhinisha
Member Avatar for Kareem Klas

Hi everyone I'm studying the part about while-statement but I don't understand the explanation in the book really well and the example doesn't work for me so I can't see it with my own eyes how it works. Can someone explain what the while-statement means and does? Also can you …

Member Avatar for Kareem Klas
0
329