49,766 Topics
![]() | |
Hello! I've been very interested in the V8 JavaScript engine recently, so I fetched the source and built it successfully, so far so good. I also successfully compiled the [Hello, World!](https://developers.google.com/v8/get_started) program Google provides. I've also read the [embedders](https://developers.google.com/v8/embed) guide. Other than that I can't find any documentation or examples … | |
ive been trying to improve my skills when it comes on to using maps and iterators but i seem to be mostly failing can someone please tell me where im going wrong or point me in the right direction compiler error a.cpp:20:55: error: conversion from ‘std::map<std::basic_string<char>, Object*>::iterator {aka std::_Rb_tree_iterator<std::pair<const std::basic_string<char>, … | |
Hello Programmers! How can I convert a double to a string without losing its precision (i.e. values after the decimal point)? Thanks! | |
I am new to programming and i am now free for 2 months after my exams, i want to learn some basic and very necessary classes or their functions or objects which are used for file folder handling. Kindly suggest some methods which i can learn. | |
Hi all I am trying to remove consecutive blank space by single blank space but getting error by this small line- `ch='';` This is what I have done till now- #include <iostream.h> #include <ctype.h> #include <conio.h> void main() { char ch; int count=0; ifstream in_stream; ofstream out_stream; clrscr(); in_stream.open("A.txt"); out_stream.open("B.txt"); … | |
I have the following structure: CObject { protected: char *mName; public: CObject(char *n) { mName=strdup(n); } }; CVector:public CObject { char *mValues[50]; int mElements; public: CVector(char *n):CObject(n) {} }; CMatrix:public CObject { char *mValues[50][50]; int mLines; int mColumns; public: CMatrix(char *n):CObject(n) {} }; My main function: int main() { pV=new … | |
I have to write a code in which i want to use 3 dimensional array but i am reaaly confused that how 2 dimen array is indexed. 2x2 array can easily be indexed 00 01 10 11. so how a 3 dimen one can be indexed? | |
Hello, I have a chain of inherited classes like this: class A { protected: int a; public: int getA(){return a;} }; class B:public A { protected: int b; public: int getB(){return b;} }; Based on that you can see that the public can only read the values in those classes, … | |
I was trying to array a string within a string. And I keep on receiving a compiler error. So I’m wondering if is even possible to string a string within a string? Because that’s the error I keep on getting. If not then what is another way to create a … | |
I have always had this question, but I couldn't quite find anything that answered it. I was hoping someone could shed some light on the question... Thank you in advance. | |
I have an abstract class CArticle and two derived classes CBook and CMagazine. I also have a class CLibrary where i want to add articles. Its members are an int variable to count the articles and a double pointer of CArticle. I have the following main function: int main() { … | |
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 … | |
Hi, I want to create a music editing program that will allow you to play songs using a MIDI device. I know there are significant differences in the capabilities of VB.NET and C++ but I'm not sure which would be more suited for such a project. Any suggestions? -James | |
in my dev c++ i'm not getting the window at the bottom of the screen which shows our errors after compilation..how do i find it..? | |
Well this is not as much as something that I dont know how to implement, but more something that I dont know why I would want to implement it. When I have a simple class, say this one: class Cube { public: Cube(int x, int y, int z); int return_area(); … | |
I've googled for a while and found few things (I hate using external libs such as cURL) and I don't really have experience with HTTP, so the question is: how can I interact with websites using sockets? so something like this: 1. I connect to the website 2. I store … | |
Greetings, this is my first time posting here, I've been a long time lurker. I have a lab assignment which is: > Write an application where you ask the user to input the price per letter (PPL), and then ask the user to input the sentence they want printed. The … | |
Anyone know how to simulate holding down a CTRL key in C++. I'm using Windows XP. Thanks | |
Hi all! I'm at work - newly hired:) - and I'm given this mpeg2 video codec [URL="http://www.mpeg.org/MPEG/video/mssg-free-mpeg-software.html"]http://www.mpeg.org/MPEG/video/mssg-free-mpeg-software.html[/URL] and in particular the decoder that exists in the folder mpeg2v12.zip. It is code c written for gcc, so I decided to download MinGW and DevC/C++. I add all the files to the … | |
i need help in this program. The program question is: A function power which will calculate a number m to the power n (m^n). You will pass two parameters float & int. If the parameter n is omitted then it should taken as 2. i hope u all got the … | |
How to make a pointer to class and how to use it? Like, what would the cout statements show on screen? #include <iostream.h> void main() { class CLASS { public: int INT; char CHAR; }; CLASS OBJECT; OBJECT.INT = 10; OBJECT.CHAR = 'A'; CLASS *POINTER = &OBJECT; cout << POINTER … | |
I am trying to write a simple text file translator, will translate the text into morsecode. I need something like this to be done: for(i = 0; i < list.size(); i++) { if(list[i] == character_from_file) { translatedLine = list[i_the_second]; } } I am wondering if I can use the "list" … | |
| |
hey there, i need help solvings my lab assignment in chapter 5: control structure II (repetition) 1. write a program that: a. prompt the user to enter an integer number x greater than 1. b. use a flag-controlled while loop to check whether the entered number x is prime or … | |
Hi there, I have a question related to C++ functions. If a boolean return type function contains too many returns in it, does it cause any problem ?? In my program one of the bool function contains too many return statements, in if conditions. And interesting thing is that it … | |
Hi My name is C.D., I am currently taking C++ 1, I have an assignment that asks me to write a function that displays the prompt string and then reads a floating point number and then returns that number. The book gives an example of the code to use in … | |
while (!correct) { cout << "Please enter an angle value => "; cin >> value; //request user to input a value if(cin.fail()) { cin.clear(); while(cin.get() != '\n'); textcolor(WHITE); cout << "Please enter a valid value. "<< endl; correct = false; } else { cin.ignore(); correct =true; } } Hi, this … | |
Illegal else without matching if, but I have an if after else. :( And how can I round off the results? I mean, if it shows 4.5 it would display 5 and if it's 4.5 it would display 4? Please help me. :((( | |
I want to open any website using me c++ program. But don't know ho it will be done, please help me. |
The End.