- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 490
- Posts with Upvotes
- 396
- Upvoting Members
- 230
- Downvotes Received
- 12
- Posts with Downvotes
- 11
- Downvoting Members
- 9
Re:
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 … |
|
Re:
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 … |
|
Re:
can you please tell how you would invert the mouse control so that up is down, left is right etc. |
|
Re:
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 … |
|
Re:
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? … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
#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 … |
|
Re:
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 |
|
Re:
#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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 :) |
|
Re:
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] != … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
#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 … |
|
Re:
how to prepare a result card in dev cpp??? i want help. any one programmer plz? |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
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 … |
|
Re:
write c programming of this question |
|
|
Re:
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. … |
Re:
[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 … |
|
Re:
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 … |