49,761 Topics

Member Avatar for
Member Avatar for bubuzzz

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

Member Avatar for Nick Evan
0
75
Member Avatar for 35nando

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 …

Member Avatar for neigyl_noval
0
320
Member Avatar for vishy_85

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 …

0
67
Member Avatar for skillincarnate

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 …

Member Avatar for Stinomus
0
346
Member Avatar for graffil

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 …

Member Avatar for Stinomus
0
97
Member Avatar for ShadowScripter

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 …

Member Avatar for ShadowScripter
0
99
Member Avatar for Daria Shmaria

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 …

Member Avatar for Daria Shmaria
0
714
Member Avatar for lolaabbydawn128

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 …

Member Avatar for VernonDozier
0
99
Member Avatar for rizillion
Member Avatar for Usura

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?

Member Avatar for Usura
0
71
Member Avatar for rizillion
Member Avatar for ShadowScripter

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; …

Member Avatar for ShadowScripter
0
92
Member Avatar for kylcrow

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. …

Member Avatar for Ancient Dragon
0
95
Member Avatar for Liszt

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 …

Member Avatar for Ancient Dragon
0
91
Member Avatar for dev565

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 …

Member Avatar for Ancient Dragon
0
937
Member Avatar for FaNtEcH

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 …

Member Avatar for tux4life
0
2K
Member Avatar for deepglue555

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 …

Member Avatar for deepglue555
0
255
Member Avatar for Liszt

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, …

Member Avatar for Liszt
0
173
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
167
Member Avatar for Liszt

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 …

Member Avatar for Liszt
0
227
Member Avatar for dev565

I use in my code (c++) CopyFile and DeleteFIle do these fumctions throw exceptions? do I need to surround them with try and catch?:)

Member Avatar for Liszt
0
110
Member Avatar for bunnyboy

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 …

Member Avatar for bunnyboy
0
110
Member Avatar for saw iv

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 …

Member Avatar for WaltP
-2
76
Member Avatar for newcook88

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 …

Member Avatar for ArkM
0
177
Member Avatar for jtltgl

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 …

Member Avatar for jtltgl
0
129
Member Avatar for power_computer

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 …

Member Avatar for Salem
0
3K
Member Avatar for Ace01000

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 …

Member Avatar for ArkM
0
176
Member Avatar for nanchuangyeyu

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 = …

Member Avatar for ArkM
0
131
Member Avatar for Usura

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 …

Member Avatar for r.stiltskin
0
95
Member Avatar for azamalvi

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 …

Member Avatar for tux4life
0
114

The End.