49,757 Topics
| |
Hey guys: I'm having trouble breaking out of a loop that takes input from a file. I can only break it if I make a code that specifies how many inputs there are and makes it stop when it reaches the max input. I think it has to do with … | |
Hey, I was attempting to make a password protection system in windows API where someone can type the password in an editbox and if it is the right password, then continue the program else display an error message box. I've tried a bunch of different things but can't get one … | |
[B] plz i wont soulotion of my questions by codes : where list is the node pointer for the whole double linked list how i can : 1- add a node after the node that has 30 2- delete a node at the beginning of the list 3- delete a … | |
i have made a opengl gui and would like to share it with the public. Please leave any comments, questions, or anything about this that you have and i will try and answer them. It has included examples and you install it like all of the other API's. Thanks. (Its … | |
This is part of an assignment that I am doing. I have to create a Queue (FIFO) using templates. I have been able to create that and it works. There is one more part to this same assignment where I am unable to figure out how to proceed. Here is … | |
[code] #include<iostream> using namespace std; class sample { static int i; public: sample() { cout<<"base:construcotr"<<endl; cout<<this<<endl; } ~sample() { cout<<"destructor"<<endl; cout<<this<<endl; } sample(const sample &s) { cout<<"copyconstructor"<<endl; cout<<this<<endl; } /* sample operator =(sample s) { cout<<"==operator called"<<endl; cout<<&s<<endl; return s; }*/ }; int sample::i=0; sample fun(sample x) { cout<<"hello"<<endl; cout<<&x<<endl; … | |
I have an issue with this assignment, the instructor says that I use the brackets incorrectly that is why the program will not compile. Please provide feedback to correct program. #include <iostream> using namespace std; int main() { system("color 4"); restart: int number, ans; number = rand() % 100 + … | |
Hi guys...I am starting with Qt and I have problems with configuring it. It write: "Start C:/Apps/Qt/demo/demo.exe... This proccess could not be started !" I am using Qt Creator 1.2.1 on Win XP SP2. In code: [CODE] #include <QApplication> int main( int argv, char* argc[]) { QApplication demo(argv,argc); return demo.exec(); … | |
OK, with some help from all of you, I have this working, but I am at a loss as to how to display the number of steps the user asks to show (if they say 10, then every tenth answer displays until the final one) and we need this to … | |
Hi everyone, I'm trying to do my assignment, and in there, I'm supposed to use a nested class with which seems I'm facing a lot of difficulties. To make things easy to understand and debug, I made a small piece of code as follows: [CODE]class outter { public: int getID(); … | |
Hi everyone . I need to play an MP3 with a microcontroller , this project has 2 parts , one part for reading form the MMC and one part is sending the read bitstream to the decoder IC (VS1003) and i didnt do anything about reading the MMC , it … | |
hi My random number function is meant to loop 6 times & output 6 different numbers. But instead it outputs 6 of the same numbers. How do I fix it? :) Any advice would be really helpful. [CODE=cplusplus] #include <iostream> #include <fstream> #include <cstdlib> #include <ctime> #include <iomanip> #include <string> … | |
I am attempting to alter a Blackjack game so that the game throws an exception and repopulates the deck when their are less than 3 cards per player. I am pretty sure I am on the right track but after 3 hours of trial and error I am still unable … | |
Hello guys, I have loaded akrip32.dll and can get handle within a function, but cannot get it when calling the function in main() Please help me app.cpp [CODE=C++] #include <iostream> //testing function below //main application int main() { CDRip instance; DWORD ver = instance.GetVersion(); LPGETCDHAND cdhandle; HCDROM handle ; handle … | |
So for my comsci assignment, I need to read in this text file with a butt load of messages. Here is what the text file looks like: [code] 1 R Jemma Harry What were you thinking? Harry, You seriously need to stop claiming your paperclip orders under the heading art … | |
Hello I am making a function that reads a text file stores each line into a string array. My problem is I am getting errors with the function but I do not understand what I am doing wrong or how to fix it? Can you take a look & see … | |
Hello friends ... I m student. I m thinking to make my career with C++ and/or JAVA. I know little bit about java career and jobs available in market, but i don't know much about C++ career. Is there good opportunities for C++ programmer in market?? Can i get good … | |
help please ok here is my code [ICODE]void sleep() { energy 100; happy + 20; strength - 1; bladder 70; age + (hour * 8); };[/ICODE] ok? all the varibles are preprocesser defined, you know #define energy 100. i have 2 file in this project main.cpp and Brandon.cpp, the funciton … | |
Folks, I'm having some trouble with overloading the '<<' operator for a templated class. For example, given a very simple template class like this: [code] template<class T = double> class Real { T m_value; public: Real( T val = 0 ){ m_value = val; } T get() const { return … | |
i wrote a code which should accept only two values, but it seems to accept any values instead. can some show me where i went wrong. sorry about the long code, still a newbie at this. double hr::change_r(double sr) //implementation from class section { dr = sr; if(sr == 17) … | |
Hi again, My logic is not too good. I am supposed to get this function to be used twice for two different inputs calling the "strings" from within the function and returning the values to main (perhaps my mistake is attempting to call this program twice??? except that is what … | |
HI!!!!!!!!! How can I find the index of same digit which is at diffrent postion in any given number(number can be of any length).... Like we have any number, suppose, 982625 How can we find the index of two 2s in this number......... I have made a form in which … | |
hi!!!!!!!!!!!!!! i m unable read fasta format file using c++.is threr any way to read 'em? | |
Hi all, I have tried this several ways. I need to get the user function to return userIn1 to main. I don't need to read anything from the call to the function, but if I leave out paraneters, it really does not work. My original issue was that the string … | |
Hi everyone! I'm totally new at C++ but quite good at Java. I know the syntax basics and that kind of stuff in C++ but when it comes to using .h files in my .ccp programs I'm totally on bare bottom. I use Dev-C++ 4.9.9.2 to compile my C++ programming. … | |
What the diffrent bettween while looping, conter-controlled while loop, sentinel-controlled while loop,flag-controlled while loop, do while loop and For loop. when we use each one of them??? please, explean in detileas. thanx :) | |
I am using MS VC++ '08, ad have run into a problem that stumps me : [code] void printtext(char **lotsoftext,int m,int n) { for(int i=0;i<n;i++) for(int j=0;j<m;j++) print(lotsoftext[i][j]); } [/code] The error is as follows : cannot convert parameter 1 from 'char' to 'const char *' How do i correctly … | |
I made an IDictionary where each value is a user-defined class called employee, and the key is an integer (the employee's id number). Now, im using such a statement: [code=CPP] for each(employee^ de in globals::clientBase) { sr->WriteLine(de->employeeName); } [/code] but i get an error at runtime saying that they couldnt … | |
Hello, i have a problem constructing a regular expression to strip out puntuations from a document.Below is a simple example of my code [CODE=c++] # //headers here //... string a="kennedy .really-really. .cool"; string replace=" "; string newStr; boost::regex expression("[ ]+(\\.)|(\\.)[ ]+",boost::regex::icase); newStr=boost::regex_replace(a,expression,replace); cout << newStr << endl; //output kennedy really-really … | |
The google references were a bit varied and ambiguos and my textbook ironically doesn't cover templates ._. if I were to make [code=c++]template <typename typ> class stk { public: stk(); ~stk(); private: struct STK { typ dat; STK *lnk; }; *chn; int ctr; }; [/code] do I have to do … |
The End.