Posts
 
Reputation
Joined
Last Seen
Ranked #873
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
8
Posts with Upvotes
8
Upvoting Members
8
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
~50.3K People Reached

97 Posted Topics

Member Avatar for ellaine101591

You coded something? Try it yourself first, if you have any problem then we'll help.

Member Avatar for MUGDHA_2
0
3K
Member Avatar for ~s.o.s~

[*]Write a program that accepts XHTML, parses and removes the tags. Then it prints out the remaining text. (Intermediate) We have to just remove the tags and display the rest?

Member Avatar for gyno
22
7K
Member Avatar for prajwaludupa
Member Avatar for sri.voma
0
680
Member Avatar for vidit_X

I am implementing RSA in C++ and here's my design(code structure). *keygen.h* namespace rsa{ class keygen{ public: //Constructor keygen(size); //Generate keys void generate(); //Getters string gete(){ return xyz; } .. .. .. private: //initializes bignums void initall(); keygen(){} //Private Member variables goes here } } *prime.h* namespace rsa{ //First 100 …

0
97
Member Avatar for DoubleZ

What do you mean by removing the necessary elements from an array? Do you want to output increasing elements in an array and remove the smaller ones that comes after them?

Member Avatar for sreejithbabu
0
210
Member Avatar for coolbeanbob

[QUOTE=coolbeanbob;1691247] I have another question. When I initialize x to 0123, x prints to the console as 83. Why is this?[/QUOTE] When you prefix a number with 0, its treated as octal. I think now you can figure out why 83 is getting printed :)

Member Avatar for coolbeanbob
0
444
Member Avatar for jpd5066

[QUOTE=jpd5066;1687014][CODE]#include <iostream> #include <cmath> using namespace std; int main() { double posNum = 0, posPow = 0, sum = 0, newVal; int counter = 0; while ((posNum != (-1)) && (posNum >= 0)) { counter++; cout << "Enter a positive number (-1 to exit): "; cin >> posNum; if (posNum …

Member Avatar for jpd5066
0
573
Member Avatar for mrnutty
Member Avatar for v3ga
Member Avatar for hardknock

Binary Search continuously divides the array and keep on searching for the target value whereas in your code the function doesn't do that. It just checks whether the target value is at mid and then changes first and last and then terminates. You would like it to continue searching rather …

Member Avatar for hardknock
0
167
Member Avatar for jenbrandau341

On the right track!! The program is reading the file and displaying all the names with index correctly but you need to include string header file. Now for your question, ask the user to enter a string and then start comparing it from the start of vector. Something like.. [CODE=C++] …

Member Avatar for jenbrandau341
0
110
Member Avatar for Aghtar

First, you are calling the factorial function before taking the input from user i.e. num is not initialized. Secondly, the loop inside factorial function is infinite. It is supposed to run from 1 to num, but watch carefully you are multiplying num inside it so it'll keep on increasing and …

Member Avatar for StuXYZ
0
167
Member Avatar for glut

Yes, cout is a variable but of type ostream. To be more precise its an object of class ostream which has << as overloaded operators. So whenever you use that operator on cout, it performs output to the screen.

Member Avatar for vidit_X
0
146
Member Avatar for crownedzero
Member Avatar for myrongainz

Your code compiles fine? Because length is a function and you are trying to use it as an array [CODE]user.length[i][/CODE]

Member Avatar for stereomatching
0
367
Member Avatar for truetexan
Member Avatar for maria536

Problem is not in your code but your logic. The expected output seems to be using compound interest but you implemented simple interest. Try.. [CODE] float raisep = (raise/100); for(int i = 0 ; i < (years) ; i++) { cout << (i+1) << " $" << wage << "\n"; …

Member Avatar for maria536
0
1K
Member Avatar for ronthedon

If you want to display a char[] or pass it to a function just use the identifier, not the index. And word[50] is a character which doesn't exists. When you declare an array A[50], the index ranges from 0 to 49.

Member Avatar for vidit_X
0
215
Member Avatar for DoubleZ

You are changing the value of variables(a, b and c) while computing the sum of their digits. [code=C++] a=a/10; [/code] Then you compare them with the sum.

Member Avatar for DoubleZ
0
355
Member Avatar for TArrington21

You are passing the wrong second parameter to getline(), it expects a string. You are passing it a char.. [CODE=C++]getline(file,inf[rows][cols]);[/CODE]

Member Avatar for TArrington21
0
130
Member Avatar for Sunshine2011

You are allocating new memory every time you call *pVketor() and I think that's the problem.

Member Avatar for Fbody
0
235
Member Avatar for ratatat
Member Avatar for terey
Member Avatar for gyme20
0
94
Member Avatar for shmamy
Member Avatar for shmamy
0
739
Member Avatar for myrongainz

When you print low to high using loop, you incremented num1 and therefore the second loop never runs.

Member Avatar for sfuo
0
2K
Member Avatar for davidhk35

The function main() expects a return value. Other than that your code works fine.... [CODE]return 0;[/CODE]

Member Avatar for davidhk35
0
145
Member Avatar for brainfo
Member Avatar for plang007

Read words from a paragraph, compare them with some equation(what type of equation?) and then add it to a string if it matches? Did I get you right?

Member Avatar for plang007
0
537
Member Avatar for Thomas Tong
Member Avatar for guccimane

You need to understand the basics of pointers, before dealing with linked lists. [CODE=C++]test->Next=Head; Head=test;[/CODE] It adds the newly created test node as the first node in the list. Before adding the list is [QUOTE]Head -> First -> Second -> Third...[/QUOTE] After adding, it will be [QUOTE]Head -> Test -> …

Member Avatar for vidit_X
0
103
Member Avatar for sergent
Member Avatar for dospy
0
100
Member Avatar for Zssffssz

Compiler translates your code to native machine code. You cannot have a compiled binary which runs on all the platforms. True for C and C++. Experts please correct me if I'm wrong.

Member Avatar for Narue
0
138
Member Avatar for Zssffssz

Is that what you asking? [CODE=C++]char alpha='A'; int x=alpha; [/CODE]

Member Avatar for Fbody
0
152
Member Avatar for bennetk2
Member Avatar for vidit_X
0
994
Member Avatar for vidit_X

I need to write a program, which prints out all the prime numbers between two numbers. The first input specifies the number of test cases, followed by the limits. Here is an example.. [QUOTE] Input: 2 1 10 3 5 Output: 2 3 5 7 3 5 [/QUOTE] I wrote …

Member Avatar for Rashakil Fol
0
157
Member Avatar for justincuppen
Member Avatar for justincuppen

It will quit when you'll enter q, since the condition will be false and the loop won't execute. [CODE=C++]while(choice == 'c' || choice == 'f')[/CODE] And please use code tags when you post code.

Member Avatar for vidit_X
0
148
Member Avatar for bobytch
Member Avatar for vidit_X
0
284
Member Avatar for GSLENK
Member Avatar for vidit_X
0
344
Member Avatar for toneatles

Use cin.get() twice.. [CODE=C++] primenum(x); cin.get(); cin.get(); return 0; [/CODE] There are other ways, but this one's the easiest.

Member Avatar for vidit_X
0
185
Member Avatar for Master Mascus

Its working fine at my end. After entering the first sentence, it asks me whether I want to continue or not. Can you give a little more detail about your problem?

Member Avatar for Narue
0
125
Member Avatar for prvnkmr194
Member Avatar for phoenix_2000
0
2K
Member Avatar for bmanzana

I think its because you have ORed "R", which is a non-zero value and thus the statement always evaluates to true. The same problem with your second if statement. And why you using string when you need to store just a character?

Member Avatar for doug65536
0
136
Member Avatar for a.muqeet khan

As @Taywin suggested, the error is in your sorting... Seems like you have mixed Bubble Sort and Selection sort algorithms.

Member Avatar for a.muqeet khan
0
223
Member Avatar for neoj88

Use the return value, initialize avgScore with average score... [CODE] avgScore = calAvgScore(...) [/CODE]

Member Avatar for neoj88
0
146
Member Avatar for Triarius
Member Avatar for vidit_X
0
103
Member Avatar for vidit_X

I wrote a program which finds the next palindrome. First, it takes an input specifying the number of test cases. The code runs fine in Visual C++, but am not able to run it in GCC. I have never used GCC before so unaware with its functioning. But am expecting …

Member Avatar for pseudorandom21
0
242
Member Avatar for surferxo3

[QUOTE=;][/QUOTE] After generating a random number inside the second for loop, you are comparing it with the current index only. Instead you should check whether the number is in that row or column, if its not, accept it else generate a new one and repeat the above.

Member Avatar for surferxo3
0
145
Member Avatar for vidit_X

I'm a lot confused with multi-dimensional arrays and pointers. I tried searching, found and read some articles. But there are still some doubts. We can not use a double pointer(int **) for a two dimensional array, right? Instead we need to have an array of pointers with the length equal …

Member Avatar for vidit_X
0
177
Member Avatar for dcasmac418

The End.