49,756 Topics

Member Avatar for
Member Avatar for hawita

Hi, I am trying to understand functions in my C++ class and i was wondering what would be an algorithm to evaluate function and find its maximum and minimum. If someone could explain this to me i would greatly appreciate.

Member Avatar for pseudorandom21
0
99
Member Avatar for C++ Beginner

Problem: Write a program that uses a loop to display the characters for each ASCII code 32 through 127. Display 16 characters on each line with one space between characters. I have tried solving this problem several ways. I either get blank screen or numbers 1-16. Can anyone lend a …

Member Avatar for furyrichie
0
2K
Member Avatar for dyingatmidnight

Just when I think I understand this stuff some else crops up to bite me. This part was supposed to be the easy part of the overall project so this does not bode well... What am trying to do is create an array of 32 variables that will be filled …

Member Avatar for mike_2000_17
0
277
Member Avatar for Theformand

I realize this is a pretty simple operation, however im totally lost, and no post I could find seem to touch on the exact same subject as mine. I have a text file, where each line is formatted like so: [CODE]float1,float2,float3,float4,float5,float6[/CODE] Each float is separated by a comma. The number …

Member Avatar for griswolf
0
155
Member Avatar for tc121091

This is my first time to use the string function. And I met some errors while doing the practice. We now need to input some words, until we input a word with 4 letters. Then the program will show the smallest and the biggest word among our inputs. e.g. Enter …

Member Avatar for tc121091
0
203
Member Avatar for CodyOebel

I am using the free alternative to SPY ++ known as Winspector, and was suggested to start using this to get more familiar with windows and handles and process handles etc... My question here is I notice when I put the crosshair over certain windows I get WINDOWS and a …

Member Avatar for WaltP
0
173
Member Avatar for NinjaLink

Is there a way to create a C++ program to rewrite a query in an optimal form without the use of a database such as storing information in arrays. If so, how? What can I do to implement this. Rewrite SELECT EMPOYEE.EMPNO, POSITION FROM EMPLOYEE E, JOBHISTORY J WHERE E.EMPNO …

Member Avatar for drkybelk
0
117
Member Avatar for kumarmpk4u

I am building a dll file. when i try to compile the dll file i get the following errors... help me am new to vc++... tool used is visual studio 6.0 GPPSCOM.OBJ : error LNK2001: unresolved external symbol "double __cdecl RoundDown(double,int)" (?RoundDown@@YANNH@Z) GPPSCOM.OBJ : error LNK2001: unresolved external symbol "double …

Member Avatar for kumarmpk4u
1
316
Member Avatar for sha11e

How can I check that the user actually is inputting what I want them to? (For example letters or numbers); I need the user to input y or n, so here is how i tried to solve it: [CODE] char answer; do { system("cls"); cout <<"Want to play? <y/n>: "; …

Member Avatar for Derek Elensar
0
155
Member Avatar for smrati.katiyar

[code] class complex { int real; int imag; public: complex(){}//why default constructor is always needed complex(int a,int b){real = a;imag = b;}// why can't we define only this constructor ~complex(){} }; [/code]

Member Avatar for Narue
0
723
Member Avatar for Eng_suha

This is the full code and the single error!!!!! 1>d:\s\o.o\hws\new folder\shop\shop\main.cpp(37): fatal error C1075: end of file found before the left brace '{' at 'd:\s\o.o\hws\new folder\shop\shop\shop.h(8)' was matched [code] #include<iostream> #include<string> using namespace std; #ifndef SHOP_H #define SHOP_H class Shop{ friend ostream &operator<<(ostream &output,const Shop &S){ output<<"\nThe name of the …

Member Avatar for Eng_suha
0
138
Member Avatar for zslgreen
Member Avatar for programing

i make twwo single linkedlist,, but i didn't know how i can merge those lists ;; [ICODE]#include <iostream.h> class linklist { private: struct node { int data; node *link; } *p; public: linklist(); void append( int num ); void appendd(int size); void display(); }; linklist::linklist() { p=NULL; } void linklist::append(int …

Member Avatar for arjunpk
0
240
Member Avatar for ninjatalon

I have an assignment where I need to Sort the linked list according to Int Variable after the user has input the information. When I try using bubble sort I'm stuck because I don't know how go back to the beginning. If a user enters : 5 4 3 2 …

Member Avatar for ravenous
0
129
Member Avatar for narunaru

I'm trying to make the quicksort but it's not working at all. I made a helper function "swap" so I can call it back in the "quick"function. then used recursive method to do it till the array is sorted. The problem is.. IT'S CRASHING EVERYTIME I RUN IT... i think …

Member Avatar for ravenous
0
149
Member Avatar for mattloto

Hey guys, so I just started learning computational geometry, and I decided to make a class for a Point and a class for a Ray. This is my code: [CODE]#include <iostream> #include <string> using namespace std; class Point { public: double x, y; Point(double x, double y) { this->x = …

Member Avatar for mrnutty
0
146
Member Avatar for sergent

I am making a program which includes comaring 2 numbers (int's) but later I want to call another windows function and it takes in CHAR not int. I need a way to convert my ints to char. I looked up this on internet and non if it worked. Do you …

Member Avatar for mrnutty
0
202
Member Avatar for Nandomo

Any tutorials on how to use CFile or any other, to open a text file, get what's inside into memory, e.x Link List, and then put it back into text file when done? Please link me or guide me through this problem. Trying to get a Payroll system going.

Member Avatar for Nandomo
0
113
Member Avatar for Howdydoody

Hey guys I have the following class code and i get an error in the addVertex method that says vertexList is not declared in scope but i dont know why. [CODE] #include <iostream> #include "DirectGraph.h" #include <string> #include <list> #include <vector> DirectGraph::DirectGraph(): vertexList(100) { } void DirectGraph::printShortestPath(int source) { } …

Member Avatar for Howdydoody
0
304
Member Avatar for VernonDozier

Here's a simple, though not the most efficient, program that flags and displays all prime numbers less than or equal to 1000.

Member Avatar for 014
0
771
Member Avatar for eskimo456

Hi I am currently primarily programing graphics applications and am still fairly new to this. I know the relevance and can see the advantages of making items a template especially with things such as collision detection. I was wandering is there any advantage/disadvantage to doing everything as a template? Obviously …

Member Avatar for eskimo456
1
120
Member Avatar for caut_baia

Hi everyone.I have a strange problem.I've written a class which handles registry keys and values of which there are two functions [code] template<> unsigned long RegistryEntry::GetValue <unsigned long> (std::string Name) { unsigned long Value; unsigned long DataSize; assert (RegQueryValueEx (Key,Name.c_str(),0,NULL,(unsigned char*)&Value, &DataSize)==ERROR_SUCCESS); return Value; } template <> char* RegistryEntry::GetValue <char*> …

Member Avatar for Ancient Dragon
0
270
Member Avatar for fglom

I'm trying to save everything to a .txt file with a new line after every string, but I can't get it to work for me. I tried using [ICODE]<<endl;[/ICODE] and [ICODE]"\n"[/ICODE] but it all gets written in a single line. So if I enter "John" for [ICODE]first[/ICODE], "Smith" for [ICODE]last[/ICODE], …

Member Avatar for fglom
0
165
Member Avatar for daviddoria

Hi all, I am trying to write a function to solve an equation for one of its variables. E.g. X + Y + Z = 0 This equation would be represented by its parameters: parameters[0] is X, parameters[1] is Y, parameters[2] is Z. If the user wants to solve for …

Member Avatar for mrnutty
0
725
Member Avatar for taumang

help me with this kind of program,i have tried to declare those variables but it continues to say u ndeclared identify CBDA [CODE]#include<iostream> using namespace std; int main() { float catergory A; float catergory B; float catergory C; float catergory D; const float Catergory of pair A = -999,99; const …

Member Avatar for taumang
0
90
Member Avatar for GhostMonkey

Hi, I've got an array where you enter values into it but I want the values you enter to be a separate colour from the values initially in the array. I tried simply using set colour when you enter the value but I've coded it so that after every user …

Member Avatar for GhostMonkey
0
101
Member Avatar for jnewing

Ok so I'm looking for a quick efficient way of reading the following binary data into memory. I'm currently reading it all and then have my own functions that break it up via the separators 0x7d (|) and read each on into a variable, however I was thinking about reading …

Member Avatar for jshoot
0
111
Member Avatar for kumarmpk4u

Hi, i am converting a vc++ project written in 16 bit code to 32 bit code. Am using VC++ 6.0. In the 16 bit code they have used a in build class [COLOR="Red"]cvbcontrol[/COLOR] which is not supported in 32 bit environment. CVBControl class was used in the code to display …

Member Avatar for Ancient Dragon
0
166
Member Avatar for SWEngineer

I have the following `main.cpp` file: [CODE] #include <QApplication> #include "ui_checkabder.h" #include <QDialog> int main(int argc, char *argv[]) { QApplication app(argc, argv); Ui::CheckAbder ui; QDialog *dialog = new QDialog; ui.setupUi(dialog); dialog->show(); return app.exec(); }[/CODE] And, get the following errors when trying to run the program: [CODE] C:/Users/avbder/Desktop/abder/main.cpp:7: error: 'CheckAbder' is …

Member Avatar for JasonHippy
0
153
Member Avatar for SWEngineer

When I try running a Qt application with the following main.cpp file: [code] #include <QApplication> #include "ui_checkabder.h" #include <QDialog> int main(int argc, char *argv[]) { QApplication app(argc, argv); Ui::CheckAbder ui; QDialog *dialog = new QDialog; ui.setupUi(dialog); dialog-&gt;show(); return app.exec(); } [/code] I get the following errors: c:/QtSDK/Desktop/Qt/4.7.3/mingw/lib/libqtmaind.a(qtmain_win.o):-1: In function `WinMain@16': …

Member Avatar for SWEngineer
0
480

The End.