49,756 Topics

Member Avatar for
Member Avatar for merse

In C++ we can define functions and their arguments can be not just variables, but functions also, for example: double Integral(double func(const double),const double a, const double b){...}; (without using any pointer) But can a function return with a function? like a differential operator?

Member Avatar for mrnutty
0
114
Member Avatar for Phil++

Right, so I'm trying to create like a login system and my overall goal is to do it in classes but for the meantime, I won't. So this is my main file: [code] #include <cstdlib> #include <iostream> #include "functions.h" using namespace std; void checkDetails(string user, string pass); string usernames[10]; string …

Member Avatar for vmanes
0
151
Member Avatar for krankzinnig

Hello, I am writing an OOP wrapper for the SDL libraries and am coming across an issue. I am trying to make a GLUT like call back system for the render loop and etc and getting strange results. Here is my code for my draw function that uses the call …

0
46
Member Avatar for daviddoria

With this code: [url]http://www.rpi.edu/~doriad/Daniweb/maxflow/[/url] If I run [code] g++ Example.cpp graph.cpp [/code] with g++ 3.3, everything works fine. However if I run the same command with g++ 4.4, I get this error: [code] Example.cpp:(.text+0x38): undefined reference to `Graph<int, int, int>::Graph(int, int, void (*)(char*))' [/code] Does anyone know how I can …

Member Avatar for StuXYZ
0
127
Member Avatar for shashanderson

STAFF PERSONNEL SYSTEM required to develop a Win32 console application to enter, search, edit and view personnel information of the staff in the company based on different access priority. This application will be used by the Human Resource personnel, staff and the administrator of this application. The main purpose of …

Member Avatar for Phil++
-1
153
Member Avatar for shashanderson

STAFF PERSONNEL SYSTEM required to develop a Win32 console application to enter, search, edit and view personnel information of the staff in the company based on different access priority. This application will be used by the Human Resource personnel, staff and the administrator of this application. The main purpose of …

Member Avatar for Phil++
-5
127
Member Avatar for Jalwes

Hi all. I have an assignment for class (obviously I am new to this), that requires us to read from a file and then print out the first 22 characters from each line within that file. I have tried using getline and get, but can't seem to get it to …

Member Avatar for csurfer
0
199
Member Avatar for willgr

Hello, I have the following code in c++. [ Windows Vista / Visual C++ 2008 ] It works fine if you pass 5 links in the "multiq" at first. If you pass any more than that it works fine again (populating the map "buffer" correctly) but then it crashes right …

0
49
Member Avatar for ENCHTERP

Hello: Is it possible to declare a variable with multiple data types. for example in my program I would like to declare my variable as int or char depending on the situation the variable is in as an example. declare variable C int K =cin(); if( K ==4) C = …

Member Avatar for ENCHTERP
0
2K
Member Avatar for Saadulla

Hello everybody, I wanna help to writing this program. Q/ Write Prog. that generates Random Binary sequenced by Using shiftRegister o f Length (10). thnx 4 Help

Member Avatar for Saadulla
0
125
Member Avatar for valkerye

I'm having a bit of an issue with a while loop in a program I'm working on. I am attempting to use a while-eof loop to read float numbers from and input file and simply rewrite those files to a created output file. My issue is that the while loop …

Member Avatar for VernonDozier
0
707
Member Avatar for new programer

Howdy Folks! I've been asked to write a program that reads in an interger N and calculates The factorial ... I wrote this yesterday but it does not seem to work .. here's the code : [CODE] #include <iostream> using namespace std; int main() { int i=0; int s=1; int …

Member Avatar for warbird43
0
131
Member Avatar for jack c++

what does: "expected init-declarator before "int" "expected ','or';' before "int" "expected constructor, destructor or type conversion before'=' token" "expected unqualified-id before '=' token" mean? what do all these compile errors mean? this is my code with most errors. [CODE]int x; ,x = 153; [/CODE]

Member Avatar for jonsca
0
134
Member Avatar for mayanktalwar

[CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); int k=0; int x; cout<<"input the no whose no of zeroes is to be calulated at the end in its factorial"; cin>>x; for(int i=1;i<=x;i++) { while(i%5==0) { k++; } } cout<<k; getch(); } [/CODE] hey in the above code it does not give compilation …

Member Avatar for warbird43
0
121
Member Avatar for ross42111

[QUOTE]I have put in all the bool operators - If the user inputs and invalid letter the while loop is supposed to ask the user to try again until a correct letter is entered. I have programmed using a while loop, switch statement and char at the same time. If …

Member Avatar for VernonDozier
0
115
Member Avatar for paruse

How to change the color and size of output in C++? How to Draw columns? I'm a beginner... Pls help...

Member Avatar for warbird43
0
112
Member Avatar for zumair

why float and int data types have different size ranges while they both need same number of bytes?

Member Avatar for warbird43
0
73
Member Avatar for warbird43
Member Avatar for Lukezzz

I am trying to Convert this Long String to an integer but when running the code, I get an error that tells that the inputstring is in an incorrect format. How can I convert this string so I will get the ouput integer: 41517 ? [code] String^ ba = "41516.7095211088"; …

Member Avatar for Lukezzz
0
92
Member Avatar for ging ging

Write a program that will allow randomized 0..100 numbers and the 15 generated numbers will serve as the input to ur binary search tree. The program should then print out the contents of your BST using preorder, inorder, and postorder traversals, store the result in the text file ( bst.txt)Recall …

Member Avatar for Agni
0
135
Member Avatar for Web_Sailor

suppose I have a file like below and I would like to create 3 output files based on my first field .. .i.e, 1 /2/3. Thats means 3 lines will go to the three files [CODE] 1 AAAAAA BBBBBB CCCCC 2 DDDDDD EEEEEE FFFFF 3 GGGGGG HHHHHH IIIII 2 copy …

Member Avatar for csurfer
0
223
Member Avatar for javamum

can someone please help me?! I have been working on this C++ project forever and I can't seem to get it. I am trying to write a program that will find the root of the following equation using the bisection method: x(1 + [summation from 1 to M of (Kj*Nj)/(1 …

Member Avatar for Amponsah
0
458
Member Avatar for ge6a93

Hello i want to code a bouncing ball which bounces when touches the end of the screen sides. I'm using VC++ 6.0. Thanks in advance for your help.

Member Avatar for Campbel
-1
75
Member Avatar for vegaseat

Python has some powerful functions, like the math expression evaluator eval(). You can embed this function and others in your Development C++ code. All you need to do, is to download and install the free Python Development Pak and feed the Python code in the form of a string to …

Member Avatar for Shantha.D
1
4K
Member Avatar for nirveshverma
Member Avatar for program900

can any one solve this, i tried no idea A function called “menu” that displays a main menu. This function should return the choice of the user.

Member Avatar for vmanes
-2
97
Member Avatar for Web_Sailor

Hi I was trying to do a type checking in my input file while reading it. I am getting some compile time errors. Compile time error report is :- [CODE]NEW.cpp:26: error: invalid conversion from ‘char*’ to ‘int’ NEW.cpp:26: error: initializing argument 1 of ‘int isdigit(int)’ [/CODE] [CODE] Line 26 is …

Member Avatar for Web_Sailor
0
230
Member Avatar for jeyson

a program that will ask a location and selete the item in that location[code][/code]

-3
60
Member Avatar for Web_Sailor

Hi, I was wondering if there is any way to get the largest size of a multimap key / value. I mean something like this:- if there are 4 values in a multimap:- [CODE] my name is web_sailor [/CODE] Suppose I want to get the maximum size key / value. …

Member Avatar for Web_Sailor
1
1K
Member Avatar for hongfan

Hello! Say I have an array called BBag[3], how would I write a function void remove(int val) that removes an occurence of val in BBag? thanks! Hong

Member Avatar for jeyson
0
521

The End.