49,757 Topics

Member Avatar for
Member Avatar for brando|away

Im working in visual studio. In a regular win32 console app i've written a class i want to use in other projects. Basically my question is what is the most efficient way to do this? (I just assumed it would be creating a header file) What kind of project do …

Member Avatar for Dave Sinkula
0
140
Member Avatar for alvalany

I just completed learning C . Now i would like to do something better. Wish to try a new language.The problem is that i cant select which one. Whether Visual C or JAVA or python ...... Also i would like to know the differences between Visual C and C.. Being …

Member Avatar for inspiron630
0
106
Member Avatar for NICEGUY123

I have a txt file which has the following input. 13 .34 67 45 12 4 85 56 42 44 2 8 3 5 2 the first number is the size, second is a multiplier, last one is used for search. I am wondering if the code below looks correct. …

Member Avatar for Sky Diploma
-4
110
Member Avatar for oneat

I'm making microprocessor oscilloscope and I want to connect in with LPT computer port and I have question. How can I read informations from LPT pins in my program (and writing them) ? (i'm using windows) And in future I want to make my own driver for this project. Have …

Member Avatar for Ancient Dragon
0
82
Member Avatar for plcross44

abc. txt has the following tab delimited values 100 81.7 2000 float tempFloat1; float tempFloat2; float tempFloat3; float tempFloat4; float tempFloat5; ifstream inFile ("abc.txt", ios::in); inFile >> tempFloat1; // debugger - 100 inFile >> tempFloat2; // debugger - 81.699995 WTF1??? inFile >> tempFloat3; // debugger - 100 //old school work …

Member Avatar for Ancient Dragon
0
84
Member Avatar for ayan2587

hi Guyz... need some help here... i want to input an integer but it can be either in hexadecimal form or in integer form. the problem is that i would like to store that input in that particular form and separate all hexadecimal values in to an array. for ex: …

Member Avatar for ayan2587
0
328
Member Avatar for ramsdellcp

[code=c++] #include "stdafx.h" #include <time.h> #include <stdlib.h> #include <iomanip> #include <iostream> #include <string> #include <fstream> #include <cmath> #include <stdio.h> #include <cstdlib> #include <sstream> #include <vector> using namespace std; int main(); class Hangman { public: void set_values (string, string, string, string, string, string, string, string, string, string, string, string, string, string); …

Member Avatar for ramsdellcp
-1
137
Member Avatar for DC257209

[code=C++] // //********************************************************************************** //File Name: averages.cc //Description: Calculate the smallest, largest, and the average of the input values. //Date: 10-6-09 //********************************************************************************** #include <iostream> #include <string> using namespace std; int main() { string line; int min=2000000; int max=0; double avg; int next; double sum = 0; double count = 0; cout.setf(ios::fixed); …

Member Avatar for mrnutty
0
143
Member Avatar for maddy1985

HI i want to know how to use isalpha in my prog please help me out printf("Enter the ip address using '.' as a seperator after each octet only integers\n"); /* Printing the statement*/ scanf("%d.%d.%d.%d.",&ip[0],&ip[1],&ip[2],&ip[3]); /* Reading the values of ip address and storing integer values*/ printf("Enter the subnetmask address …

Member Avatar for mrnutty
-1
98
Member Avatar for Oritm

I created a map<string, void*>. The void* used to store an Object from a class called Window. I can cout a string with the following: [CODE] it = windowMap.find(title); if( it != windowMap.end() ) { cout << "Value is: " << it->first << '\n'; } else { cout << "Key …

Member Avatar for Oritm
0
63
Member Avatar for mrinal.s2008

Hi, While trying a program from "C++ Primer 3rd Edition" by Stannley Lippman, I encountered with following two errors. 1. The book says that the header file fstream also includes the header iostream, so including just fstream will do. But g++ complained about cout, cin and cerr despite having fstream …

Member Avatar for William Hemsworth
1
318
Member Avatar for hur1214

[CODE] phonenode *start_ptr = NULL; phonenode *crrnt_ptr; void alpha_order(){ phonenode *ptr, *curr, *temp; ptr = start_ptr; for(bool didSwap = true; didSwap;){ didSwap = false; for(curr = ptr; curr->next != NULL; curr = curr->next){ if (curr->surname > curr->next->surname){ temp = curr; curr = curr->next; curr->next = temp; didSwap = true; } …

Member Avatar for dkalita
0
91
Member Avatar for Kl2eativ

Well let me start by showing off my source. [code]//This is a game called "The Guessing Game" #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int number; unsigned seed = time(0); srand(seed); seed = 1 + rand() % 100; cout << "Please try to guess a …

Member Avatar for siddhant3s
1
106
Member Avatar for robgeek

D.I.C Head ** Joined: 22 Oct, 2007 Posts: 51 [IN] My Contributions I am little confused here. So please help me. I am given a txt file in the following format 110001 + 123500 ...... I need to read these numbers into the source file, do the addition and then …

Member Avatar for rbv
0
104
Member Avatar for ayan2587

hi Guyz... need some help here... i want to input an integer but it can be either in hexadecimal form or in integer form. the problem is that i would like to store that input in that particular form and separate all hexadecimal values in to an array. for ex: …

Member Avatar for John A
0
160
Member Avatar for that_fox

Hello, this seems like it will be a helpful community. For my degree I need to take a basic C++ class and the only C++ class the offer that fits is an 8 week class, it [I]really[/I] goes too fast. Anyways, I've been trying my hardest, but my brain really …

Member Avatar for chunalt787
0
164
Member Avatar for kn336a

[code=php] #include <iostream> using namespace std; int main() { int num; const int MAX = 8; int output[8]; cout << "Enter a number [0 - 255]: "; cin >> num; cout << num << "converts to"; for (int i = 0; i < MAX; i++) { output[i] = num % …

Member Avatar for kn336a
1
105
Member Avatar for rinalini

hi can anyone help me i have a assignment in which i have to do hamming code encoding and decoding using binary in c++ and iam really lost ......can sumone help me pliz......

Member Avatar for mrnutty
0
39
Member Avatar for ccoleman52932

The following is my class project and I do not have a clue where to begin. Could someone at least point me in the right direction? For this project we are going to work with computing the Fibonacci Sequence (also called Fibonacci Number). We will be using a menu to …

Member Avatar for ccoleman52932
0
86
Member Avatar for Mahyar

[code=cplusplus] #include <iostream.h> #include <conio.h> char *mystrstr(char *,char *); void main(void) { clrscr(); char *str1,*str2; str1 = new char[100]; str2 = new char[100]; cout << "Enter first string: "; cin.get(str1,99); cin.get(); cout << "Enter seconed string: "; cin.get(str2,99); cin.get(); cout << mystrstr(str1,str2); getch(); } char *mystrstr(char *s1,char *s2) { // …

Member Avatar for sarayaj
0
202
Member Avatar for EddieC

Urbancode today unveiled AnthillPro 3.7, the latest version of its build and deployment automation tool that piles seven popular source code analysis tools onto its [url=http://www.anthillpro.com/html/products/anthillpro/tool-integrations.html]list of third-party integrations[/URL]. There's also support for the GIT repository and DB2 and PostgreSQL databases, the company said today in a statement. Anthill Pro …

0
327
Member Avatar for jakesee

Hi, I have the following functions [CODE]void LoadData(char* file, float* data1, float* data2) { // read data size and contents from file data1 = new float[dataSize1]; data2 = new float[dataSize2]; // store data data1[0] = 1.0f; data1[1] = 2.0f; // etc ... } void ComputeData() { float *data1 = NULL; …

Member Avatar for jakesee
0
250
Member Avatar for programmingnova

Hello, I've been programming with C++ for only several weeks now, but I have come across a practice problem that has given me trouble. The objectives: collect data from a student including: his major (CIS or Math), last name, number of credits completed, GPA, and tuition paid. Then calculate and …

Member Avatar for programmingnova
2
134
Member Avatar for lotrsimp12345

Basically the please hit any key to enter doesn't show up in Visual C++.Thanks for help main //CS 310 /*Create a text file and input in certain data into the text file*/ //Program one #include <iostream> #include <fstream> #include "Account.h" using namespace std; int main() { account b; char name1[256]; …

Member Avatar for lotrsimp12345
0
191
Member Avatar for C++ Beginner

The Question is: Write a program that asks a user to enter one of the following state abbreviations: NC, SC, GA, FL, or AL. The program should then display the name of the state that cooresponds with the abbreviation entered ( North Carolina, South Carolina, Georgia, Florida, or Alabama). Input …

Member Avatar for Grn Xtrm
-1
152
Member Avatar for kiuhnmgrtdcv

hi how can i terminate a process using vc++ i check somewhere and i found TerminateProcess function but this is not useful to terminate a process by it's name[for example notepad.exe] i hope you help me

Member Avatar for rbv
0
149
Member Avatar for zach1988

hey guys i'm new at programming so i would like to know whats the steps required to solve to following question below. Thanks in advance! Let a0,a1...an-1, b0,b1,...bn-1 be two distinct binary sequences. We say that a0,a1...an-1 is lexicographically smaller than b0,b1...bn-1 if ai = 0 and bi = 1 …

0
42
Member Avatar for loolyn

Hi. I'm using OnCtlColor function to change the background color of a text. I'm using SetBkColor for that, however the background is changing only for the text written, not the whole rect of the CStatic text window. Any ideas? Thanks.

Member Avatar for MrSpigot
0
80
Member Avatar for Carrots

Hi, I am for the first time using Strings in a program, and for some reason my program wont compile. When I use integers the program compiles and runs fine, but since I've changed it to use strings it's giving the following error (Visual Studio): [QUOTE] error C2511: 'Leads::Leads(std::string)' : …

Member Avatar for Ancient Dragon
0
136
Member Avatar for gauri_phatak_87

Hello everyone, I have to write a code to creat a pseudo assembler..I have an input file from which i read the assembly instructions from there i get the register numbers ...i have to convert that into machine code..i.e binary form... Now my problem is that i can find the …

Member Avatar for mrnutty
0
749

The End.