49,761 Topics

Member Avatar for
Member Avatar for tehprince

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 …

Member Avatar for tehprince
0
95
Member Avatar for tootypegs

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 …

Member Avatar for Ancient Dragon
0
104
Member Avatar for ben8118

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) { …

Member Avatar for ben8118
0
120
Member Avatar for mrjoli021

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

Member Avatar for Nosgammot
0
154
Member Avatar for Max_Payne

[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"; } …

Member Avatar for dubeyprateek
0
216
Member Avatar for rwkopcke

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

Member Avatar for jbennet
0
140
Member Avatar for navi17
Member Avatar for Jishnu
0
89
Member Avatar for rajatC

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 …

Member Avatar for Jishnu
0
229
Member Avatar for hellokitty88

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 …

Member Avatar for Jishnu
0
118
Member Avatar for imkul

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 …

Member Avatar for Rashakil Fol
0
462
Member Avatar for ENG ISE student

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() { …

Member Avatar for Ancient Dragon
0
104
Member Avatar for guy40az

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.

Member Avatar for Uncle_John
0
98
Member Avatar for driplet

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!

Member Avatar for Narue
0
453
Member Avatar for CaninA

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

Member Avatar for CaninA
0
177
Member Avatar for invisal

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 …

Member Avatar for dubeyprateek
0
368
Member Avatar for cherries

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 …

Member Avatar for Jishnu
0
96
Member Avatar for vs49688

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

Member Avatar for Ancient Dragon
0
94
Member Avatar for shayantani

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

Member Avatar for dubeyprateek
0
296
Member Avatar for eranga262154

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 …

Member Avatar for WolfPack
0
98
Member Avatar for hmdhros03

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!

Member Avatar for hmdhros03
0
62
Member Avatar for Jakiro

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

Member Avatar for Salem
0
121
Member Avatar for toolmanx

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

Member Avatar for Salem
0
524
Member Avatar for eranga262154

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

Member Avatar for rajatC
0
120
Member Avatar for revenge2

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) + ( …

Member Avatar for rajatC
0
104
Member Avatar for eranga262154

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"); } …

Member Avatar for eranga262154
0
432
Member Avatar for haelly

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

Member Avatar for ithelp
0
291
Member Avatar for <1337>Me</1337>
Member Avatar for Zeking

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 …

Member Avatar for Ancient Dragon
0
98
Member Avatar for Jishnu

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 …

Member Avatar for Jishnu
0
152
Member Avatar for kv79

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 …

Member Avatar for Brent.tc
0
186

The End.