• Register

Recent questions tagged c

0 votes
0 answers 2 views
Problem: I want to remove elements from a vector. Is there any mechanism that C++ provides to remove elements from the vectors? How can I remove the elements from a vector??
asked 12 minutes ago Sheeza 2.4k points
0 votes
1 answer 3 views
Problem: I have following program in which I want to reduce the number of digits after the decimal point to 2 in output. #include <iostream> using namespace std; int main() { float number = 4.2323434; cout << number <<endl; return 0; } I do not know how to do that. Could anybody please guide me?
asked 50 minutes ago Sheeza 2.4k points
0 votes
2 answers 3 views
Problem: I am a medical student interested in computer world. I want to learn programming but I do not know where to start from. Some people suggest me to start from C++ and some people say that I should learn Java first. I am a bit confused. If someone could give me a sincere answer to the question that where should I start with, I would be thankful to him/her all my life. Thanks
asked 1 hour ago Sheeza 2.4k points
0 votes
1 answer 3 views
Problem: I want to add comments in MATLAB and comment a certain lines of code. How do I do that?
asked 9 hours ago Ahsan 1.8k points
0 votes
1 answer 3 views
Problem: I am new to MATLAB nad I want to display a string in MATLAB. How do I do that?
asked 10 hours ago Ahsan 1.8k points
0 votes
1 answer 3 views
Problem: I want to check the length of a vector that I initialized and the length of a vector that is initialized dynamically by the user at run time. How I can do that? If possible, please give the examples.
asked 19 hours ago Sheeza 2.4k points
0 votes
1 answer 2 views
Problem: I am currently learning vectors in C++. I am trying to dynamically initialize my vector but insert() function is throwing some sort of error. How can I initialize a vector dynamically in C++?
asked 19 hours ago Sheeza 2.4k points
0 votes
1 answer 3 views
Problem: Is it possible to append a char to a string in C++? If yes then how?? Suppose I have a string variable whose value is &ldquo;This is strin&rdquo; and now I want to add the g in the end of the string. How can I do that?
asked 21 hours ago Sheeza 2.4k points
0 votes
1 answer 2 views
Problem: I want to round off a number based on the number after decimal point. For example, if a number is 3.4, it should be rounded off to 3 and if a number is 3.6, it should be rounded off to 4. What should I do in order to do so?? I tried typecasting but it did not work as desired.
asked 22 hours ago Sheeza 2.4k points
0 votes
1 answer 3 views
Problem: I want to know the difference between | and ||, & and && in C++. What is the difference if I use the &lsquo;if&rsquo; condition as if(a == b || a == c) or if(a == b | a == c)? Please elaborate. Thanks
asked 23 hours ago Sheeza 2.4k points
0 votes
1 answer 4 views
Problem: I want to know whether the character at a certain index in a string is a number or not in C++. Moreover, I wanna see whether the user entered a number as input to a character variable or some other character. How can I do that?
asked 1 day ago Sheeza 2.4k points
0 votes
0 answers 6 views
asked 1 day ago Mubashir Islam 120 points
0 votes
1 answer 4 views
Problem: I want to know how can I get the ascii value of character in C++? Is there any mechanism to do so? If yes, then please elaborate with examples.
asked 1 day ago Sheeza 2.4k points
0 votes
1 answer 3 views
Problem: I want to know how can I find the answer of 2^6 in C++? Moreover, is there any way to calculate the powers on dynamic data in c++?
asked 1 day ago Sheeza 2.4k points
0 votes
1 answer 3 views
I want to count lines, words and characters from a file. I'm having a problem counting the right amount of characters and words.
asked 1 day ago Ahsan 1.8k points
0 votes
2 answers 11 views
asked 5 days ago SapperIt 1.2k points
0 votes
1 answer 5 views
asked 5 days ago SapperIt 1.2k points
0 votes
1 answer 3 views
asked 5 days ago SapperIt 1.2k points
0 votes
1 answer 3 views
asked 6 days ago SapperIt 1.2k points
0 votes
1 answer 7 views
Problem: hello c++ developers, I am just curious how can I convert string to an array.
asked 6 days ago SapperIt 1.2k points