49,761 Topics

Member Avatar for
Member Avatar for RohitSahni

Hi all, [code] fstream filestr ("test.txt", fstream::in | fstream::out); [/code] Plz confirm me about the permission on "test.txt". it will be '777' by default ..am i thinking correct.?

Member Avatar for Salem
0
66
Member Avatar for zite.1
Member Avatar for Masood Ali

Hi, I am debugging a C++ application. when I compile it, the compiler gives an error [code]fatal error C1083: Cannot open include file: 'dir.h': No such file or directory [/code] I have seached for the file dir.h, but I could not find it. Please help.

Member Avatar for Salem
0
128
Member Avatar for shouvik.d

recently while studying STL i came thru functors and facades > http://en.wikipedia.org/wiki/Function_object] > A typical use of a functor is in writing more intelligent callback functions. A callback in procedural languages, such as C, may be accomplished by using function pointers. However it can be difficult or awkward to pass …

Member Avatar for vijayan121
0
293
Member Avatar for eyedea2011

I'm trying to write 2 codes in C++, but i'm having major problems. The first one should output something like this: Enter a number: 123 -- Enter a name: Jack Thank you, Your name and number is Jack and 123. [code=cplusplus] #include "stdafx.h" #include <iomanip> using std::cin; using std::cout; using …

Member Avatar for Ancient Dragon
0
391
Member Avatar for complete

I am looking for a good example of how to do a pop-up menu in MFC. I have found this bit of code: [CODE]void CMyView::OnRButtonDown(UINT nFlags, CPoint point) { CView::OnRButtonDown(nFlags, point); CMenu* menu_bar = AfxGetMainWnd()->GetMenu(); CMenu* file_menu = menu_bar->GetSubMenu(0); ASSERT(file_menu); file_menu->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, point.x, point.y, this); }[/CODE] But what if my …

Member Avatar for complete
0
1K
Member Avatar for tformed

I am working off the code that the professor provided, but for some reason I cannot get it to work. It is giving me errors. I created a project in Visual Studio. The header file: [code]#include <iostream> #include <math.h> using namespace std; class xy_coordinate { public: void input(); void print(); …

Member Avatar for ~s.o.s~
0
223
Member Avatar for mauro21pl

Hi I have a small code and a question concern it. What is the value of the first print of ptr2. I have 0. Why? Isn't suppose to be a memory address like for example 0xff10 thanks [CODE=cplusplus] #include<iostream> #include<conio.h> using namespace std; int main() { //a: 0xdf30 //b: 0xef41 …

Member Avatar for Ancient Dragon
0
96
Member Avatar for mauro21pl

Hi Could anybody fill the table for me. thanks Declarations and initializations int i=3,j=5,*p=&i,*q=&j,*r; double x; [code] value Equivalent expression value p==&i; **&p r=&x 7**p/*q+7 3**q-*p [/code]What excutly means: **&p and *&p Ihave seen them somewhere, but I don't know what it means thanks

Member Avatar for Bench
0
106
Member Avatar for Stefano Mtangoo

Hi! I'm Newbie in programming and I'm interested in VB and VC++.My problem is that I don't know completely how to program VB or VC++ Dll so that i will NOT repeat procedures in each exe i write. Is there anybody to guide me to write simple example? With regards, …

Member Avatar for Ancient Dragon
0
99
Member Avatar for ShawnCplus

I'm having a slight problem. This particular function is crashing caused by the Loadfile ifstream being opened. [code=c++] void LoadChar(Entity players[], char saveNum) { string filename, saves; saves = saveNum; filename = "save/Save" + saves + ".sav"; char *file; file = const_cast<char*>(filename.c_str()); ifstream Loadfile(file, ios::in); //this little diddy right here …

Member Avatar for ShawnCplus
0
1K
Member Avatar for eyedea2011

I'm a student that needs extra emergency help please!! Please help my assignment is already late. I'm trying to get these 2 codes to work but i can't. I have no more ideas, can someone please please help me. I'm using Microsoft Visual C++ to for my codes. Here they …

Member Avatar for Salem
0
247
Member Avatar for eyedea2011

Can someone please help me with this code, it should change numbersd to text. It compiles but the CMD box has the incorrect output. [code=c] #include "stdafx.h" #include <stdio.h> #include <string> //#include <math.h> // for exp(), pow() and log10() int _tmain(int argc, _TCHAR* argv[]) { int number=5; char text[10][10] = …

Member Avatar for John A
0
238
Member Avatar for mauro21pl

Hi I try to compile that program to see the results but I encountered a problem. The error that is guven by my comiler is : K undeclared (first use this function) e undeclared n undeclared and so on how my I make it compile thanks [code=C++]#include <iostream> int main() …

Member Avatar for Ancient Dragon
0
98
Member Avatar for rainbow78

it suppose to take the user input(a number) and put that item into your item into the inventory(1. hat, puts hat into the inventory). After that I need a loop that will keep adding items into the inventory intill it reaches the max and allow the user to discard one/replace. …

Member Avatar for rainbow78
0
290
Member Avatar for shouvik.d

As we all know we don't have Hashes in STL can anybody please suggest an analogous way of emulating it. Or also has any library added it as a standard component? Please do let me know

Member Avatar for Rashakil Fol
0
151
Member Avatar for *~ Salam ~*

[COLOR="Red"]- Creat a Daubly Linked List with 9 node with the following values: 3 ; 2 ; 1 ; 4 ; 6 ; 7 ; 2 ; 8 ; 3; - print the Daubly Linked List: - Creat a function number " Special Delete" that searches for a value in …

Member Avatar for WolfPack
0
101
Member Avatar for Fromethius

Hello everyone, I have this code: [CODE] Image* newImage = Image::FromFile(szFileName); Bitmap image(50, 50); Graphics graphics(&image); HDC gfxHDC = graphics.GetHDC(); graphics.DrawImage(newImage, 0, 0); int pixel, row; for (pixel = 1, row = 1; row <= 50; pixel++) if (GetPixel(gfxHDC, pixel, row) != RGB(255, 255, 255)) [/CODE] Anyways, whenever I use …

Member Avatar for WolfPack
0
155
Member Avatar for quintoncoert

i hope that this does not sound like a silly question but can someone please tell me why we return an integer from the main method in c++? if program execution starts and ends in main then what is the point? main calls other mothods and receive return types so …

Member Avatar for Salem
0
617
Member Avatar for RohitSahni

Hi All, [code] In file included from ../../incl/_Components/DbRes.h:7, from DbRes.cc:1: ../../incl/_Components/IniReader.h:79:8: warning: extra tokens at end of #endif directive /sbcimp/run/pd/gcc/3.4.2-32bit/lib/gcc/sparc-sun-solaris2.8/3.4.2/crt1.o(.text+0x5c): In function `.nope': : undefined reference to `main' /var/tmp//ccA4edOw.o(.text+0x84c): In function `DbRes::Lock::Lock(String const&, String const&)': /home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::String(char const*)' /var/tmp//ccA4edOw.o(.text+0x8c4):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to `String::~String()' /var/tmp//ccA4edOw.o(.text+0x8e4):/home//Developer/__local_unix/_/lib/_Components/DbRes.cc:65: undefined reference to …

Member Avatar for thekashyap
0
112
Member Avatar for ganurobotto

plz help me to solve those errors.. # include<iostream> using std::cout; using std::cerr; using std::endl; Class DcmFileFormat int main() { DcmFileFormat fileformat; OFCondition status = fileformat.loadFile("C:\Documents and Settings\ganeshk\デスクトップ\subj006reg000.dcm\GE2EQ2FB.DCM"); if (status.good()) { OFString patientsName; if (fileformat.getDataset()->findAndGetOFString(DCM_PatientsName, patientsName).good()) { cout << "Patient's Name: " << patientsName << endl; } else cerr << …

Member Avatar for Salem
0
113
Member Avatar for jbennet

Okay I have made a c++ console application to take user input and append it to a text file and then read it back. I am using the win32 version of Dev c++ [code] #include <iostream> #include <fstream> #include <string> using namespace std; int main(){ int choice; cout << "What …

Member Avatar for Salem
0
152
Member Avatar for Firestone

I tried searching the forums for this, but couldn't find anything. If I were to make a career out of computer programming, which would be better to learn, Java or C/C++?

Member Avatar for Rashakil Fol
0
364
Member Avatar for eXceed69

Any one familiar with this error? [COLOR=#000000]exit code 100 error[/COLOR]

Member Avatar for thekashyap
0
85
Member Avatar for Milkybar

Hello Im a beginner in C++. I havent done any bit of programming. I am doing an Information Systems course through Intec College. My course includes Financial Management, Business Management, intro to computers and then C++. So I am finding it very difficult as this is not my field and …

Member Avatar for Milkybar
0
81
Member Avatar for Pmaster

Hi all, Does Visual basic net support inline c or c++ code and if so what keyword method, etc. ,do I use to do this. Thanks in Advance.

Member Avatar for cwood
1
163
Member Avatar for biganimal

I all ready completed and ran a program that works fine in Python but now I'm looking to convert that code to C++ in Eclipse. I thought I would be able to import this code than have some miracle conversion take place. Is this possible or does the whole code …

Member Avatar for vijayan121
0
5K
Member Avatar for darkrappaz

hi everybody!! well iam taking this c++ class and we r doing this problem that is givin me such a headache so i trying to get some help , topic are string and vectors. ok this is what i have to far all the precondition and postcondition are given becuase …

Member Avatar for darkrappaz
0
110
Member Avatar for cheongsiwei

Hi , I am stuck with my this bank account programming. The question is like this: Create a base class Bank of a bank account with member functions to allow withdrawal, deposit and calculation of balance. Account should have a name, account number and type. Create derived class Saving of …

Member Avatar for JRM
0
208
Member Avatar for lavilare

Hello I am new to this forum and was wondering if someone could give me advice regarding a good compiler to continue learning C++. I took a C++ course but used the gcc compiler in the labs, now that I got my laptop, I don't know where to start. Thanks …

Member Avatar for jwenting
0
91

The End.