49,761 Topics
| |
in visual C++, we have to write #include <list> to use linked list and all it funtion. So, where is the actual file (.h, .cpp) that contains the declaration of the linked list? is it in "C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\src\mfc\list_o.cpp" Thanks | |
Hello! When my program in C++ exits, it throws errors like: EInvalidPinter with message 'Invalid Pointer operation' ... and later: EAccessViolation with mesage 'Access violation at address 00000010 ... and finally: Abonarmal Program Termination I can't locate the code responsible for it ( I am using many libraries in my … | |
Im trying to create a c++ server. Im using the schedule_Mgmt IDL , where module-schedule_Mgmt and i hav 3 interfaces , 1-config , 2-Listener, 3-MessageServer the following is my server code : [code] #include "schedule_MgmtI.h" #include <CosNamingC.h> int main( int argc, char *argv[] ) { try { cout << "Starting … | |
I am having problems with compiling some code in C++ which i am learing from Deitel and Deitels C++ how to program. When trying to compile one of their examples i get the following errors D:\Web Design\C++\C++ how to program\Fig03_15>g++ fig03_17.cpp C:\DOCUME~1\SKILLI~1\LOCALS~1\Temp/ccUzb5iL.o:fig03_17.cpp:(.text+0x1aa): undefined reference to `GradeBook::GradeBook(std::string)' C:\DOCUME~1\SKILLI~1\LOCALS~1\Temp/ccUzb5iL.o:fig03_17.cpp:(.text+0x283): undefined reference to … | |
I have two queues Q1 and Q2 ; Q1 :A1,A2, A3 Q2: B1, B2, B3 and i want to merge them to newQ: like A1,B1,A2,B2 and so on...till the both Qs are empty what is best Algorithm do you think? I'm kind of confused i was thinking about a priority … | |
Hi, I remember from when I learned PHP, how easy and fun OOP was, and how to call member functions in conjuction (after eachother) on the same line, like this: [CODE=PHP] MyClass->Foo()->Bar()->Pancakes("flour etc"); [/CODE] To be able to do that, all you needed to do was make a return holding … | |
In an assignment involving cyclic shift hash codes, the instructions include the following code: [code] int hashCode(const char* p, int len) { unsigned int h = 0; for (int i = 0; i < len; i++) { h = (h << 5)|(h >> 27); h += (unsigned int)p[i]; } return … | |
I have this program, I went all over the place with it and I got confused. Its supposed to call the accelerate function 5 times and get the current speed of the car and then display it. Then, its supposed to call the brake function 5 times and then get … | |
Please can someone tell me the difference between a struct and an enumeration? | |
hey is it possible to create a pointer that points a struct value, like [CODE] struct person{ int name; int age; }; person me; person *ptr = me.name; [/CODE] any suggestions on how to do this? | |
why does "Array out of bounds exception" error occur when tryin to complie | |
Contrary to what the title implies, my real problem lie in returning a vector pointer, and then use it. Here's what I tried: [CODE=cpp] #include <vector> #include <string> #include <cstring> //? Needed? #define R_OK 0 #define R_ERROR 1 using namespace std; vector<string>* tester(){ vector<string> v; v.push_back("Lolzer"); vector<string> *ptr = &v; … | |
I have a project due in an hour, and I am stuck on it. My project is to write some functions for a maze. ( Live regions, Dead Regions, and if it is possible to exit). The point of the project is to understand graphs and specifically depth first search. … | |
I try to change the icon for the application file in the debug folder. In the properties, there is no choise where you can do this but if I create a shortcut of this application file, then it is possible. Is there a method to create an icon on the … | |
I'm developing in c++ but yet need to use FILE * from c (I know fstream option) I want to read line by line [code] string str; char* line; while(!feof(file) && FIleLength(file)>0 && fgets(line, 1024, file)) { str=line; str.append("hi"); fputs(str.c_str(),file) } [/code] I have a few concerns: 1) What if … | |
Hi! I'm new to this forum and joined as i had some doubts regarding c++. I've been studying c++ at school for about 8 months now and now we've been given a project to complete. Here's the topic: [url]http://www.cbse-sample-papers.blogspot.com/2008/09/computer-science-project-c-class-xii.html[/url] I've decided to make a Manager mode sort of a program … | |
string pin, checks, list; checks = whitecheck(kingsq); pin = whitepin(kingsq); list = whitelist(checks, pin, wkbool, wqbool, enpassant) i wrote a chess program in VB6 and have finished converting it to C++. however everytime pin or checks is not a null string it throws a GPF. how can i pass the … | |
If you have done a program in VC++ 2008, what is the procedure to do a release and a "Finished" program of this. In the "Form1 Property Pages", I have under General choosed: Configuration: [I]Release[/I] Platform: [I]Active(Win32)[/I]Output Directory: C:\ Intermediate Directory: [I]C:\[/I] When I now compile the application using F7, … | |
After pondering and wondering, I have decided to go for wxWidgets. Here is my first trial application. After running a test app from zetcode.com in my Code::Blocks & wxWidgets and I confirmed that it is fine! Then I tried to write my own app as shown below but I ran … | |
For the moment I am getting the computers name with this code, but perheps there could be others and better ways to get a computers unique "ID". I am searching for a way to identify a computer so a software can recognice that computer in order to work. The very … | |
I use in my code (c++) CopyFile and DeleteFIle do these fumctions throw exceptions? do I need to surround them with try and catch?:) | |
So, i wrote stack, which is using vector strategy in case of being too small. The code compiles well and works until the resize function is called to resize the size of array. Tnx for any help solving this error. [CODE=cplusplus]#ifndef STACK_H #define STACK_H const int DEFAULT_SIZE = 10; template … | |
i want from any one to write the following programme for me i want it by graphics & off course i want the full programme i want the programme written in borland c++ [U] The programme:[/U] it is required to build an application which simulates the famous connect-4 game. the … | |
how do i create a set method to get the fstream input file. in need to be able to define the file location in the main method. [CODE]class a { private: ifstream fileOne; ofstream report1; public: void setinput(std::ifstream& in); void setoutput(std::ofstream& out); }; [/CODE] how can i code these set … | |
i have a delimited file it has name|address|address2|phone number/n i found this code snippet of code which i modfied to almost do what i want. the problem is i want to only count the delimited char which is '|" and '\n' but the program is counting the char instead. here … | |
After being told using scanf and printf instead of cout and cin because they are treated like a function instead like cout and cin being treated as a object thus equaling faster code generation so I am relearning as a i go Can you not use a string in printf … | |
Hi, i've only been learning c++ for a couple days now, so im fairly new to it. :p. After I read the basic tutorials and got somewhat used to the c++ environment, I attempted to create a calculator and after trying to solve all of my errors, it became very … | |
Hi, What I actually want to do is really quite simple,that is, convert all the data(of short type)in a file to their abstract values respectively.But I did not accomplish it. Here my code is listed:[CODE] #include <iostream> #include <cmath> #include <fstream> using namespace std; int main() { char *in_name = … | |
hey ive got 2 different classes and each class has its own struct with the same type of data... would i be able to create a function that returns the whole sturct from one class to the other? ive got something basically like this class A{ private: struct student{ int … | |
Any one help me plzzzz..... i have an assignment...... that is ______*********_______ Write a program that takes an equation as a string and does the following: Solve 8 parts to achieve 100% 1 - 5 are compulsory. Input: 2x^2+3x+4=0 1) read a quadratic equation 2) print its coefficients (coefficients range … |
The End.