49,756 Topics
![]() | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 | |
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 … | |
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 … | |
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] | |
[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 … | |
[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 … | |
How to change the color and size of output in C++? How to Draw columns? I'm a beginner... Pls help... | |
why float and int data types have different size ranges while they both need same number of bytes? | |
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"; … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
hi enjoy it and give feedback | |
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. | |
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 … | |
a program that will ask a location and selete the item in that location[code][/code] | |
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. … | |
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 |
The End.