49,761 Topics
| |
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. | |
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 … | |
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> … | |
#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 … | |
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, … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hi ..... can any one help me how to change logger level of ACE framework loggers. wijitha | |
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 … | |
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 … | |
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 … | |
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 *' … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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... … | |
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 … | |
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 … | |
| 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 … |
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 … | |
can somebody please help me out in writing matrix 10*10 matrix program. thanks in advance | |
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 … |
The End.