Posts
 
Reputation
Joined
Last Seen
Ranked #72
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
97% Quality Score
Upvotes Received
490
Posts with Upvotes
396
Upvoting Members
230
Downvotes Received
12
Posts with Downvotes
11
Downvoting Members
9
97 Commented Posts
34 Endorsements
Ranked #40
Ranked #60
~689.21K People Reached
Favorite Tags
c++ x 2K
c x 382
print x 15
Member Avatar for existinglady

hello, can someone help me, when I put the codes from my book and edited them to use filestream, I encounter an error #include <iostream> #include <fstream> #include <string> using namespace std; struct nodeType { string info; nodeType *link; }; int main() { nodeType *head = NULL; nodeType *newNode; nodeType …

Member Avatar for Roy_264
0
6K
Member Avatar for Mahnoor_1

Question is: Create a class Employee with following constraints in mind: 1. Declare three private data members named id,name,NIC of int,string,long respectively. 2. Overload stream insertion and stream extraction operators. Implement a global function named saveData, that'll allow the user to enter any number of employee's data and store it …

Member Avatar for Muhammad_251
0
4K
Member Avatar for monkey_boy_401

can you please tell how you would invert the mouse control so that up is down, left is right etc.

Member Avatar for D_5
0
3K
Member Avatar for yobbko

I need help with reading data from web page. I wanted to do database of rates (forex). For example: whan price is (eur\usd) 1.4231 then 1.4230 then 1.4229 then 1.4230. I wnated to make text file and application (c\c++) write there those price. In tex file: 1.4231 1.4230 1.4229 1.4230 …

Member Avatar for baabroz1
0
421
Member Avatar for tensity

This is the first program for a class that I am taking. I am having trouble creating the classes. We were only taught briefly on the subject and then told to complete this project. I guess my first question is how should I set my class "deck" and "card" up? …

Member Avatar for Hunter_2
0
2K
Member Avatar for Sarlacc

I wrote an application using pthreads which had 5 threads. 4 of the threads filled up 4 buffers and once they had been filled the main thread would be combine these together. This was achieve using barrier so the main thread would wait until the 4 worker threads had reached …

Member Avatar for Ben_27
0
7K
Member Avatar for montjoile

hi there, I'm coding in windows, c++, but when I traslate my code to ubuntu, g++, I get this error: [B]lvalue required as left operand of assigment[/B] This is the line where I get the error: [COLOR="Red"][/COLOR][CODE]&*raiz=&*p;[/CODE] What could be the problem? *raiz and *p are pointers to an avl …

Member Avatar for Tushar_4
0
2K
Member Avatar for Anonymous_1

#include <iostream.h> #include <stdio.h> #include <conio.h> float get_time_start (int message) {float t; if (message==1) cout<<"Enter Start hour:"; else cout<<"Enter Start minute:"; cin>>t; return(t); } float get_time_end(int message) {float t; if (message==1) cout<<"Enter End hour:"; else cout<<"Enter End Minute:"; cin>>t; return(t); float determine_bill(float sh, float sm, float eh, float em, int …

Member Avatar for Moschops
0
547
Member Avatar for mzee rajput

i want to make an artificial system in c++ language for a doctor or any judge that will take input from the user and by using rule of inference it will display the result as true or false, can anybody help me to solve this problem

Member Avatar for bernardo.mclobo
0
132
Member Avatar for Affan Ahmed

#include <stdio.h> int main(){ int k=0; char q1[0],q2[0],q3[0],q4[0],q5[0],q6[0],q7[0],q8[0],q9[0],q10[0],q11[0]; char a[0]={"b"},b[0]={"a"},c[0]={"d"},d[0]={"c"},e[0]={"d"},f[0]={"c"},g[0]={"b"},h[0]={"d"},i[0]={"c"},j[0]={"a"}; printf(" MCQS TEST PAPER \n \n \n Total ten question each of 1 Marks \n \n \n1.What is your country name? \na)India \n b)Pakistan \nc)Srilanka \nd)America \nEnter your correct option : "); scanf("%s" , &q1); printf("\n \n2. What is your …

Member Avatar for Moschops
0
228
Member Avatar for prgmmgbgnnr

i was given an assignment to create a word construction game where the program will randomly picks a combination of vowels and consonants and the user will build as much words as possible from the choosen letters. my prog will check for the correctness of the words and gives the …

Member Avatar for prgmmgbgnnr
0
231
Member Avatar for clife

Hi, I would like to view the source code( the current line it has executed/going to do) in gdb while i am debugging, and i know list and other commands will display the code. what i would like to know is do i need to set some path or something …

Member Avatar for rproffitt
0
314
Member Avatar for can-mohan

Hi All, Usually in factory method we need to check the existance of object based on given argument and then need to return the object and due to this we need to have multiple if and else statement and while adding one more type then again one more else block …

Member Avatar for rubberman
0
259
Member Avatar for TheFearful

Hello everyone, can anyone explain to me what is wrong with my project? I coded the program using my linux system using Vim and the g++ compiler. I then copied that text over to Visual Studio since I am assuming my professor is going to compile and run it through …

Member Avatar for Moschops
0
438
Member Avatar for Anirudh_2

Hi! I have a hexadecimal word in the form of a string, and i need to convert it into binary. For eg : AA FF (there is a space in between the two parts). How do i convert this into binary ? Thanks in advance :)

Member Avatar for Moschops
0
209
Member Avatar for COKEDUDE

I'm having trouble with the if statement. I have verified with print statements that (int)strings_line_tokens[l][m] == 0. I thought maybe my logic was backwards since I had two not statements with an or, so I changed it to an and. That didn't help either. if((int)strings_line_tokens[l][m] != 10 || (int)strings_line_tokens[l][m] != …

Member Avatar for Moschops
0
139
Member Avatar for SpottyBlue

I got the questionairre problem. I was trying to fill the answers from the 20 questions and output the file as results.txt, but it only shows the answers of 19 questions. And when I fill up all the answers, the total score shows 0. The scores for each question (except …

Member Avatar for rubberman
0
193
Member Avatar for COKEDUDE

I have seen both ways for reading file error messages. Is one better than the other? Is exit(0) better than return 1 or vice versa? FILE *fp; fp = fopen(argv[1], "r"); //Open file for read. if(!fp) { printf("Error opening file %s!",argv[1]); //Program prints error message and closes if file is …

Member Avatar for Moschops
0
227
Member Avatar for anumash

Hi, I was learning operator overloading and I noticed a very strange thing. I could access the private variable of another object by using the object reference and the . operator. Both the objects belong to the same class and I can alter the value of a private variable of …

Member Avatar for anumash
0
268
Member Avatar for mimic03

I created a 2D array and filled it with random values from 0 to 100 and now i'm trying to find the average and maximum number of all the value inside it. But i'm having serious problems understanding the problem with my functions and how to connect them in the …

Member Avatar for Moschops
0
310
Member Avatar for Charite

Hi everyone! So I am really new to C++ and am currently taking this computer science class in school. We use Visual Stuio 2013. Tomorrow I have 3 programs due and I have only finished 1 so far. Everything I read in my textbook and what the teacher says confuses …

Member Avatar for Moschops
0
237
Member Avatar for jamesjohnson25

#include <stdio.h> #include <stdlib.h> char* format(char* buffer,size_t size, const char* name,int quantity,int weight){ snprintf(buffer,size,"Item: %s Quantity: %d Weight: %d",name,quantity,weight); return buffer; } int main() { char *buffer = (char*)malloc(90); printf("%s\n",format(buffer,sizeof(buffer),"Axle",25,45)); return 0; } When i run the above program, i expect the output Item: Axle Quantity: 25 Weight: 45 But …

Member Avatar for Moschops
0
135
Member Avatar for Toheed Rana

how to prepare a result card in dev cpp??? i want help. any one programmer plz?

Member Avatar for rubberman
0
111
Member Avatar for can-mohan

Hi All, in below code snippet, I have been facing memory leak issue while free memory for string.Could you let me know thereason for the same.I believe if we are allocating memory then it needs to be freedbut what i observed if i don't free the memory it works fine …

Member Avatar for can-mohan
0
1K
Member Avatar for anumash

I wrote the following program to access an object's private members via its address. How is it possible that the following code did not give me *ANY* error? The code compiles and gives me the right answer. Does this mean C++ is inferior to other languages in its ability to …

Member Avatar for ddanbe
0
274
Member Avatar for New Jack

My program is to solve the simple problem in the Link[http://codeforces.com/problemset/problem/143/A] #include <stdio.h> #include <cstring> #include <math.h> #include<set> #include<iostream> #include<algorithm> #define MAXN 25 #define INF 100000000 using namespace std; struct _point { int L;int r; bool operator<(const _point &a)const{ return (this->L<a.L); } }; set<_point> up,down; int r1,r2,c1,c2,d1,d2; void solve(){ _point …

Member Avatar for Moschops
0
191
Member Avatar for vikash_5
Member Avatar for vikingGamer

I'm learning with a book and one of the excercises is to have the computer guess a number of which you think. My problem is that I need to keep altering the range which works for a couple tries then it seemingly forgets the range and goes on its own. …

Member Avatar for Nutster
0
869
Member Avatar for lewashby

[Linux] When using gcc and or g++ is there a way I can have two output files, one with and one without debugging symbols in one gcc/++ command? I don't want to have to write `g++ --Wall program.cpp -o program`, then have to immediately run `g++ --Wall -g program.cpp -o …

Member Avatar for ipswitch
0
285
Member Avatar for Mariana_1

Hi ! I am trying to do a game for children to test their attention. So I have two images and they have to find out the differences between the images. How can I open the image on c++? I also have a specie of questionair to see how many …

Member Avatar for ipswitch
0
371