49,761 Topics

Member Avatar for
Member Avatar for kv79

Hi to all, just a small question? This is typed in the book. hInstance is used for things like loading resources and any other task which is performed on a per-module basis. What is pre-module basis. Google won't help.

Member Avatar for kv79
0
89
Member Avatar for lacy1104

I am working on a project in which i have to use Classes and do multiple things with different sorts of data. The basic question i have though is this: what am i doing wrong here in terms of this class declaration etc...i get ton of errors and cant seem …

Member Avatar for Ancient Dragon
0
269
Member Avatar for Underdog67

I'm having a lot of difficulty trying to figure out how to label headings in a 2D array using enum type. Here is the basic for-loops to read in and out the values of an array. (This is a 5x5 array). [CODE] #include <iostream> #include <fstream> #include <iomanip> #include <cstring> …

Member Avatar for Duoas
0
2K
Member Avatar for ferrari77

#include<string> #include<iostream> #include<fstream> using namespace std; class fileHandleString { private: ifstream infile; ofstream outfile; public: fileHandleString() { infile.open("input.txt", ios::in); outfile.open("output.txt", ios::in); } ~fileHandleString() { infile.close(); } string getFromFile() { string str; getline (outfile, str); return (str); } }; The above code is what I am using but I keep getting …

Member Avatar for Duoas
0
505
Member Avatar for ENG ISE student

I am getting an error i dont recognize and dont know what to do to fix it and input would be great. The error is: [CODE]prog4.cpp:23: error: no matching function for call to 'std::basic_istream<char, std::char_traits<char> >::get(char [500])'[/CODE] [CODE] #include <iostream> #include <ctype.h> #include <cstring> using namespace std; void encrypt(char ch, …

Member Avatar for Ancient Dragon
0
98
Member Avatar for raj1

I am using a for loop to calculate the distance between the vertices of a polygon using for (i=0; i<N, i++) { j= (i-1) result = sqrt (sqr(X-X[j])+sqr(y-y[j])); } return result; This work fine however it doesn't and I cant calculate the distance between the last and first vertice e.g …

Member Avatar for raj1
0
109
Member Avatar for tiffy1012

I am having a hard time getting this program (my homework assignment) to compile. I have looked it over a million times. The program is supose to read an inventory of an art gallery from "art.dat" into a struct (the Type and Place have to be enum types), and then …

Member Avatar for vmanes
0
119
Member Avatar for yuzhang

Hello All: I have been thinking to learn develop a GUI using C++. Any suggestions on where to start? (Using which development kits and etc) Thank you

Member Avatar for maddog39
0
83
Member Avatar for balla4eva33

I have this code: [code] void ShapeArr::publishStats() { double ap = 0.0; for (int i=0; i < currCount; i++) { Shape *s = arr[i]; ap += s->getAPRatio(); } cout << "Max APRatio = " << [COLOR="Red"][B]???[/B][/COLOR] << " Average APRatio = " << ap/currCount << endl; } [/code] What do …

Member Avatar for balla4eva33
0
115
Member Avatar for np2100

I am still a beginner, I recently started learning C++. However I am writing a program that converts currencies. For example Dollars to Euros. However when I have them pick the number of the currency they want to convert the number 2 doesnt work. Here it is: [CODE]#include <iostream> using …

Member Avatar for np2100
0
280
Member Avatar for kararu

Hi all, Can anyone suggest me commands which will take a given thing and execute it in the command line and return the output. system() doesnt suit me bcos 1.it returns int not entire output 2.it opens command line window(shell) ( I dont want to open the window or display …

Member Avatar for hkdani
1
115
Member Avatar for finalheavenx

Hello I'm a newbie c++ student, I would like to ask how can I get this kind of program output by using c++: [B]10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 …

Member Avatar for Salem
0
322
Member Avatar for rlwright12

I am trying to take the following code so that my bottom function first pulls out the first three scores of a text file and averages them, then pulls the last three scores out and averages them. I am using a known good text file that has 7 entries with …

Member Avatar for WaltP
0
94
Member Avatar for wijitha

hi ..... can any one help me how to change logger level of ACE framework loggers. wijitha

Member Avatar for Ancient Dragon
0
172
Member Avatar for yeah

hi friends I tried to link c++ object files using "bfin-elf-ld" and got some undefined reference errors Errors::::: (.text+0x2ee8): undefined reference to `operator delete(void*)' (.text+0x2ef4): undefined reference to `_Unwind_Resume' (.text+0x2efa): undefined reference to `operator new(unsigned long)' (.text+0x25f6): undefined reference to `__muldf3' (.text+0x2620): undefined reference to `__floatsidf' I dont know why …

Member Avatar for Salem
0
126
Member Avatar for dammest

Write a program that counts the number of occurrences of selected words in standard input. Remarks: • The selected words are given as command line parameters. • The program should print out the words with their number of occurrences. Use following definition: typedef struct { char * word; unsigned int …

Member Avatar for Ancient Dragon
0
69
Member Avatar for pdhbaseball23

I have to use arrays to calculate some statistics on a set of data. The example of the file looks like this: 6 5 1 3 2 4 3 4 2 4 2 1 2 3 5 6 8 5 6 9 4 3 1 5 7 3 7 2 …

Member Avatar for pdhbaseball23
0
102
Member Avatar for twooften

I have been trying to figure this one out for a while, so please don't laugh. I know it is a little messed up. I didn't include the whole code, if necessary I will post more. The line indicated is giving me a "cannot convert from 'HGLOBAL' to 'int *' …

Member Avatar for ithelp
0
232
Member Avatar for pdhbaseball23

I have to use arrays to calculate some statistics on a set of data. The example of the file looks like this: 6 5 1 3 2 4 3 4 2 4 2 1 2 3 5 6 8 5 6 9 4 3 1 5 7 3 7 2 …

0
59
Member Avatar for DamiLeon

Hi to all, I am new to this C++ world I have kind of a quick question. I need to do a modified selection sort that can handle characters. I know how to do one but only with integers (see code below). Any help or suggestion as to how I …

Member Avatar for Ancient Dragon
0
98
Member Avatar for Marks256

I am still starting out with c++, but i like tackling complicated tasks when i learn. I have a project in mind that requires me to play MP3s. Since i will be doing MOST of the code in c++ (at least that is what i plan at the moment), i …

0
61
Member Avatar for balla4eva33

Maybe my other thread was too wordy for everyone, cuz I usually receive help right away, and I see that it was viewed 20+ times and yet no responses...so basically I need help with my homework...We were given a main.cpp file, and PART of a header file. He also gave …

Member Avatar for balla4eva33
0
94
Member Avatar for FireSBurnsmuP

Great, more iterator trouble. First we have an iterator of any value. I want to make a second iterator that starts one higher than the first one. Look-see: [code] for( iterator_type one ; /*...*/) { for( iterator_type two = one + 1 ; /*...*/) { /*...*/ } }[/code] That's the …

Member Avatar for vijayan121
0
138
Member Avatar for FireSBurnsmuP

Alright, here's the code: [code] for ( map<string,int>::iterator word = mostUsed.begin() ; word != mostUsed.end() ; word++ ) [/code] and the error by g++ - (using make) [code] error: conversion from 'std::_Rb_tree_const_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >; int> >' to non-scalar type 'std::_Rb_tree_iterator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >; int> >' requested[/code] Okay... …

Member Avatar for FireSBurnsmuP
0
442
Member Avatar for guitarrick

I'm missing something really basic on this one I'm sure. We have to write a program using a class Odometer, that will track fuel and mileage of a car. The member functions are given: one to set fuel efficiency, one to accept total miles driven and add to the odometer …

Member Avatar for Duoas
0
95
Member Avatar for guitarrick

Of all things, I can't seem to get my do while loop to work. I have a running program, but get a[I] syntax error : identifier 'choice'[/I] Can't see it, any help greatly appreciated RG [CODE]#include <iostream> using namespace std; class Odometer { public: Odometer(); void reset(); void compute_fuel(); void …

Member Avatar for guitarrick
0
125
Member Avatar for johny112

Hi all, I have written a programme, but when it prints the results , it doesnt print £ sign [CODE]cout <<"Salary is £ "<< salary_without_overtime<<endl;[/CODE] Instead it prints u="U" with a funny bar on top. Now im very new to c++ but i do know basics, can someone please tell …

Member Avatar for iamthwee
0
83
Member Avatar for clockscan

Hello, I am hoping to get some code for the following problem I need to verify that a user input the time in the following format: cout<<"please enter the start time(hh:mm:ss): "; cin>>stime; //Verify user input time correctly cout<<"please enter the end time(hh:mm:ss): "; cin>>etime; //Verify user input time correctly …

Member Avatar for Narue
0
86
Member Avatar for adypan06

can somebody please help me out in writing matrix 10*10 matrix program. thanks in advance

Member Avatar for adypan06
0
47
Member Avatar for sarahger9

I am trying to generate a random vector of integers and sort them using merge sort. I am having trouble with the code. It is long, but I would appreciate if someone could take a look at it and see if the can help me, I've been working on it …

Member Avatar for Ancient Dragon
0
102

The End.