49,757 Topics

Member Avatar for
Member Avatar for mcconnell_34

can someone show me how to prompt user to input a number from 0-35 and if the number is less than or equal to 9 it will display the number but if it is greater than nine it will store it as A=10, B=11, C=12...... By using the cast operator …

Member Avatar for thines01
-3
117
Member Avatar for kutuup

I am not sure why but this code (an attampt at a point and click game engine using Allegro 5) throws up an unhandled exception. The program starts and displays a picture, but as soon as the mouse is moved the exception pops up and the program crashes. I have …

Member Avatar for kutuup
0
266
Member Avatar for marirs07

Hi all, How to find the offset of a structure member just by knowing the structure name and the address of that member????? For ex. [CODE]Struct cook { int a; int b; char c; }eat; void func(int *ptr) { //how to find the base address of structure. //I know only …

Member Avatar for Narue
0
158
Member Avatar for dospy

basically i have a header full of function prototypes(util.h) and a cpp file with the functions body [CODE] // util.h #include <ctime> uint32_t GetTime( ); uint32_t GetTicks( ); // util.cpp #include <util.h> uint32_t GetTime( ) { return GetTicks( ) / 1000; } uint32_t GetTicks( ) { return clock( ); } …

Member Avatar for Fbody
0
2K
Member Avatar for sandman64

[CODE] #include <iostream> #include <string> using namespace std; int getNumAccidents(string); void findLowest(int, int, int, int, int); int main() { int counter, num, crash1, crash2, crash3, crash4, crash5; string n = "North", s = "South", w = "West", e = "East", c = "Central"; for (counter = 0; counter < 5; …

Member Avatar for sandman64
0
152
Member Avatar for vrs1155

friends i am using visual c++ 6.0.i need to use multiple cpp files and that cpp file to be communicate.can you tell any one how to do??? thanks for the helping

Member Avatar for Moschops
0
60
Member Avatar for Panathinaikos22

Hello, There are many tutortial about it, but all are olds or are for C.. if someone know any FRIENDLY site/forum/pdf to learn c++ please give it, for my c++ window programming is like chines, because there is no any help like in VB/C#/F#/Java and things work totaly diferent, example... …

Member Avatar for Ancient Dragon
0
351
Member Avatar for marirs07

Hi all, How to find the base address of a structure ,just by knowing the name of the structure and a address of one of its members. Thanks in advance

Member Avatar for marirs07
0
3K
Member Avatar for skylinedrifter

Hello people! Got a project due tomorrow been at it the whole day still no luck hopping one of you guys could help me out before tomorrow :/ First one...... This is the code [CODE]int main() { const double Tax = 0.0825, Rate = 0.15; int PartNum, Units; double Price, …

Member Avatar for Taywin
0
287
Member Avatar for meli123

heyy all :)) So im working on a new piece of code here..take into consideration that I love while loops and that's what I really want to use! so here is how the program would go read: # then read: base print: decimal representation thanksss :))

Member Avatar for Taywin
0
104
Member Avatar for Tom_Weston

What I want is when I type "calc;" (without quotes), The calculator opens. Else, if I didn't type it correctly (example: "calc" (without quotes)) it will generate an error. [CODE]#include <iostream> #include <string> using namespace std; int main () { string calc; char end; end = ';'; cin >> calc …

Member Avatar for Tom_Weston
0
83
Member Avatar for XodoX

Hi, how do I exactly do this? [quote]1) Read an integer from the input. (Reading will automatically stop after the first non-digit character, accounting for possible sign characters.) 2) DO read the next character WHILE the read character is whitespace, then validate it as an operator and store it. 3) …

0
74
Member Avatar for Ravic85

[CODE] Rectangle::Rectangle() {length = width = 1.0;} Rectangle::Rectangle(double len) {setLength(len);} {setWidth(1.0);} Rectangle::Rectangle(double len, double wid) {setLength(len);} {setWidth(wid);} [/CODE] I get this error: Error 1 error C2447: '{' : missing function header (old-style formal list?) H:\C++\Programming assignment one\Programming assignment one\programming assignment 1 member functions.cpp 19 on line 5 and 9 and …

0
79
Member Avatar for amzyz

I havent programmed in C++ for about 3 years.. Since i started uni actually.. Now i gotta implement some stuff for Algorithms and Complexity.. I've got a vague idea of how to do that but thats not my problem.. According to my memory and old programs that i dug up …

Member Avatar for EEBlake
0
2K
Member Avatar for Zssffssz

Can anyone list the pices of hardware I can manipulate with C++ and code with it \ ex: #include <windows.h> Beep(250,250) for internal sepeaker. Thanks in advance

0
105
Member Avatar for Triarius

Hi! I'm running the latest OpenSuse 11.4. I have knowledge of C++ programming and I think I'm ready to start using graphics. I have downloaded [URL="http://sourceforge.net/projects/alleg/files/allegro/5.0.4/allegro-5.0.4.tar.gz/download"]allegro-5.0.4.tar.gz[/URL], extracted it and tried to include allegro.h file in my C++ code. Here is my testing file for allegro. [CODE]#include <iostream> #include "/Documents/Allegro/include/allegro5/allegro.h" int …

Member Avatar for lawnmoler
0
276
Member Avatar for wnr78ta

I am writing a program for an assignment, i have a main that calls a test and the test simply tests all the functions within a class called int11, the int11 class and implementation are as follows [ICODE] #ifndef INT11_H #define INT11_H #include "proj1.h" class Int11 { private: T _left; …

Member Avatar for wnr78ta
0
335
Member Avatar for Cainer

Hi, I'm not sure if this is right forum to ask, please don't kill me if it isn't. I'm using Visual Studio C++ Express 2010. I found that different setting in project properties can lead to big difference in performance of application. My app was running at 140 FPS, I …

Member Avatar for mike_2000_17
0
141
Member Avatar for darren2005

Hi, The was my application works is that my C++ .exe will create a .bat file, which will then in turn run the .bat file. [CODE]ofstream myfile ("tmp.bat"); if (myfile.is_open()) { myfile << "keytool –import –alias exe –file cert.cer –key example\n"; myfile.close(); system("tmp"); [/CODE] The batch file is created, however …

Member Avatar for metoohere
0
428
Member Avatar for SoFLy

For an assignment, I am writing a program in c++ that prompts the user for the day of the month, the weekday (numerically), the month, and the year. Then, based on that, I've got to have it output a calendar that is similar to the Unix 'cal' command. I've got …

0
86
Member Avatar for Jsplinter

I am trying to write a class which holds either a pointer to an object of class A(base) or class B(derived) depending on conditions at run time. The base class and derived class: [CODE] class A { protected: int x; }; class B : public A { public: int y, …

Member Avatar for gerard4143
0
152
Member Avatar for marirs07

Is it possible to find the offset value similar to offsetof() function when i know only the structure name and the address of the member of structure. For ex in offsetof , the structure name and the member name is given to find the offset. Similarly is it possible to …

0
106
Member Avatar for Frederick2

This is my first post! I can’t figure out how to modify/cast the return address obtained from the Windows Api function GetProcAddress() without using a typedef. I’m aware that using a typedef is the standard way to do this, but one should be able to do it without a typedef, …

Member Avatar for bitluni
0
4K
Member Avatar for cent91

i have a code that uploads a file to ftp. i want it to add an exception in firewall when it executes so that the firewall doesnot request the user for permissions. i know how to add a registry entry but i dont know how to add a firewall exception …

Member Avatar for Satyrn
0
463
Member Avatar for sumi1234

the aim of this program is to create a record of 20 members inputted by the user st the phone number is stored in 3 different parts e.g. 011-234-7891 where 011 is area code 234 is exchange and 7891 is numbr...every record must have a member id and member name …

Member Avatar for sumi1234
0
264
Member Avatar for GSLENK

I dont know how i did it before, but i dont quite remember how to get started on a win 32 console program for Microsoft Visual 2010 ultimate edition. could someone give a basic idea of where to start for a blank template? I did: New project, Win 32 console …

Member Avatar for dospy
0
172
Member Avatar for dospy

i've never knew how to use command line arguments since the first source code i used to edit(and from i learned basics of c++) was using a config file to 'read' user input data on program startup and not command line arguments. now my question, what's the difference between using …

Member Avatar for dospy
0
1K
Member Avatar for Merex

Hi everyone, I'm new here and I have been reading some books for a while on C++ software Development. I have a good idea of what I wan't to program at the present point in time, so I thought I would post a road map of what I'm going to …

Member Avatar for Merex
0
263
Member Avatar for lightdshadows

[CODE]#include <fstream> #include <iomanip> #include <string> using namespace std; const double PI = 3.1416; int main() { ifstream inFile; string fname, lname; int age, beginningBalance; double length, width, radius, interestRate; char ch1; inFile.open("inData.txt"); inFile >> length >> width >> radius >> fname >> lname >> age >> beginningBalance >> interestRate …

Member Avatar for lightdshadows
0
207
Member Avatar for carlpike

Hello everyone. I am having an issue with flash style connection So I start off by connecting to port 843 and requesting a <policy-file-request/> The server sends me this: <cross-domain-policy> <site-control permitted-cross-domain-policies="master-… /> <allow-access-from domain="*website.com" secure="false" /> <allow-access-from domain="*website.com" to-ports="443-49151"/> </cross-domain-policy> Since it is non secure, I try to connect …

Member Avatar for cherrymae.calma
0
452

The End.