49,761 Topics
| |
I'm a newbie to C++ and figured this would be a good place to ask for guidance. I need to write a program that reads input from a txt file which contains "grades" in numeric format, I.E. 92, 55, 88 and take those grades and calculate the average. Now my … | |
hi basically i have a couple of questions. I have an image of a thumb drive. I have gone through the image extracting information from the file allocation table until i have all of the files saved as strings. Basically i would like to progress from this stage to reconstrcuting … | |
i not sure how to solve the problem. Pls help me. Thanks. asg.cpp [CODE=cpp] #include<iostream> #include<ctype.h> #include"Stack.h" using namespace std; main(){ char ch; nodeIntType operand1,operand2,result; StackInt S; InitializeStack(&S); cout<<"Enter postfix expression"; cin.get(ch); while (ch!='\n') { if (isdigit(ch)) { Push ((nodeIntType)((char)ch-(char)'0'),&S); } else { Pop (&S,&operand2); Pop (&S,&operand1); switch (ch) { … | |
I upgraded to vs2008 and now I can delcare and int, bool, or any primative data type, but when I delare a string it wont let me. int ip; Works char ip; Works string ip; DOES NOT WORK I get these three errors. error C2146: syntax error : missing ';' … | |
[b]Menu.h[/b] [code] #pragma once #include <iostream> #include <cstring> using namespace std; class Menu { private: string title; public: Menu( void ); Menu( const Menu &unMenu ); ~Menu( void ); void setTitle ( string title ); string getTitle() const; }; [/code] [b]Menu.cpp[/b] [code] #include "Menu.h" Menu::Menu(void) { this->title = "Hello"; } … | |
I have just tried to use Dev-C++ v 4.9.9.2 IDE GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA When I compiled my first program I received a link error: [Linker error] undefined reference to `WinMain@16' … | |
is there any difference b/w object and instance? pls tel me in detail? | |
hi....well this is my first post in this community...i hope people here will help me in my doubts... I am an intermediate level programmer of c++... i have a doubt regarding the permutations of a given string and permutations of first N natural numbers... i have written a program for … | |
I am reading a text file from an input file. The problem is that when I cout the text to the screen not all of the original text file is showing. The text file is large, but I was wondering if there was any way I could possibly display all … | |
Hi All, I am interested in making http requests and parse the response back from that request using a Borland C++ 5.0 Client application. If anyone has a sample code or some links that can help me write this method, that would be great. I did some google and could … | |
So I'm supposed to copy the word "computer" or "computers" from the text of one file and past the word each time to the new file. It compiles but it doesnt run right. Any input would be great. [CODE]#include <iostream> #include <fstream> #include <cstring> using namespace std; int main() { … | |
Could someone recommend a C++ compiler to write programs on a linux platform. I am just looking to write some programs in the shell not really looking to do any X-windows programming right now. | |
Hi there: I need to convert a variable of single character to corresponding ASCII number. Can some body tell me how to do this? I tried int(), static_cast(), atoi(), not working. Thx in advance! | |
plz i wanna sol for this q with describ anyone can help me ??? write C++ program cosist of two structures - The first called "Address" consist of three elements (city, state, and zip code). - The second called "Employee" consist of seven elements ( Employee name, number, Address, Birthdate, … | |
Firstly, I got this class: [code=cplusplus] class A{ public: void show() { std::cout << "Hello World"; } } a; [/code] I am trying to get the address of [B]show()[/B] function. [code=cplusplus] int main() { void (*ptr)(); ptr = &a.show; *ptr(); return 0; } [/code] And, it doesn't seem to work … | |
Hi I am a newbie in C++. I need some help here for my homework. I tried all methods that I know but I just can't get it. =( I need to design a staff information enquiry program which can display information of staff sequentially in staff database with the … | |
| Hi Guys. I am relatively new to C++ so i may seem a bit inexperienced, but please bear with me. I am doing a little c++ project to help increase my experience and i have come to a stand still. (I have defined loopcount earlier on in the program) [code] … |
I work in C,C++ Windows platform. I am to write code to format a pendrive. I searched and found DeviceIOControl() that seemed to fulfill my purpose. But I cannot proceed any further. Plz help me in this regard. thanx Shayantani | |
Hi all, I'm going to learn a new subject on C++. Working with Windows API. Since I work with Java there is no API used, but I feel it is better to work a little with APIs. Here is my attempt for that. I want to read the system time … | |
I'm kinda sick of dos windows programming, this stuff i've added is sorta what i'm at, still learning obviously if you take a glance at it, just wondering what I should try and write now, suggestions appreciated! | |
[B][/B] I face the problem when i key in 5 5+ the result is 10. But i key in 5 6+ he give the result 12. Some equation can give me true result some give me false result. Anyone can help me toubleshoot? The following are my program: [CODE][LIST=1] [*]#include … | |
I am having trouble getting ReadFile to work for me. I am runnng an AMD with XP SP1. I compile with a .cpp extention normally using Borland Bcc32 but I have also compiled using cl.exe. I declare LPVOID lpBuffer and have tried assigning memory using malloc. I also tried GlobalAlloc. … | |
Hi all, I have a function that calculated two int values. I call the function only by using a string and calculated those two int values. I want to return that two int values from the function when I call it with a string. Look at the following function, [CODE] … | |
hello there, it says that i have 2 errors in my code. What have i done wrong? (doesnt show where); something that calculates the area and the perimeter. [CODE] #include <iostream.h> typedef unsigned short int pint; int main() { pint width; pint length; pint area=(width*length); pint perim=( (width+width) + ( … | |
Hi all, I've create a window using CreateWindowEx windows API and do some work on it. Thats fine. But for the safer operation at the end of all the processing I want to close/destroy the window. I've try this, [CODE] BOOL clsWin = DestroyWindow(m_hwnd_RTFBox); if(clsWin != 0) { printf("SS"); } … | |
modularize program code by using functions. You will produce two solutions: a) using global access functions, and b) using classes and member functions. a) Using Access Functions Write five Invoice access functions: setInvoice(), computeAmount(), getAmount(), printData() and a global client function computeAmount(). Function setInvoice() has five parameters of types Invoice, … | |
your homework." What does this mean. | |
Hello everyone. I am begginer with Hashing algorithm. So I had for project to write a simple Console Phonebook that uses Open Adress Hashing with Linear Probes. I was working with templates. When I compile it I get Unsolved External errors (5 of them) and I have no clue how … | |
Hello, I'm planning to do a project which involoves a lot of GUI. Does anybody know whether there is any IDE available that supports a code wizard feature for C++? For eg in VB, we design the menus, frames, text labels, etc. and when we click on 'generate code', the … | |
Hi to all , I have a problem i can't see my message box. Here is the TEST2.cpp [code=c++] #include <windows.h> #include <winuser.h> #include "TEST2.h" BOOL EndDialog(HWND hDlg,INT_PTR nResult); /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); BOOL CALLBACK ToolDlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM … |
The End.