48,985 Topics

Member Avatar for
Member Avatar for dudekill123

I have created a program store user data in file. But i am only getting one error only but i am unable to debug it. Please help me I used turbo C++ compiler Error is on the line int employee::search_for_employee( int choice, name_temp[20] , email_temp[50]) Here is my code [code] …

Member Avatar for nightcrew
0
147
Member Avatar for Labdabeta

I am trying to make a static library using Code::Blocks and when I make a new static library project it generates a cpp file with functions encased with [ICODE]extern "C"[/ICODE] I am just wondering if this is necessary or if I can write the functions in normal c++ as well.

Member Avatar for vijayan121
0
130
Member Avatar for QQnoobie

Trying to define a function that dynamically creates a Student object and then prompts the user for the info and returns pointer to a Student object. [CODE]class Student{ private: string firstName; string lastName; string aNumber; double GPA; public: Student (); Student (string f, string l, string idNo, double gPoint); string …

Member Avatar for QQnoobie
1
138
Member Avatar for Sumeet6

You are to write a program to test the <ctime> library from the C++ Standard library. In particular, we are interested in testing the function clock () that counts the ticks since the program was started. It is known that this function returns different results for different C++ implementations/architectures. In …

-3
66
Member Avatar for pce369

Hi, I am trying to undertake an exercise in which a payroll file is generated. Unfortunately, I seem to be having problems with respect to passing values to functions that calculate pay for various types of employees and tax rates. The code compiles and runs, but generates zeroes for the …

Member Avatar for pce369
-1
261
Member Avatar for phorce

Hello, I am working on an algorithm that checks to see if a value is in an array, however, it doesn't seem to want to work .. It will display that the first number is there but nothing else.. Any ideas? Heres the code: [code] #include <iostream> using namespace std; …

Member Avatar for gerard4143
0
219
Member Avatar for greimykudau

[CODE]#ifndef NODE_BINARIO_H #define NODE_BINARIO_H # include "Colacircular.h" # include <iostream> using namespace std; template<class T> struct Node_Binario // struct of node { T Dato; Node_Binario<T> *left; Node_Binario<T> *right; int Profundida; }; template<class T> // class tree class Arbol { public: Arbol(); //constructor bool Insert(Node_Binario<T> * raiz,T item); // funtion insert …

0
39
Member Avatar for HungMob

Hello, I'm a Freshman in college that's going to majoring in Electrical and Computer Engineering. Right now I'm taking a C++ class and I'm looking to do something funny to a friend of mine. I have been searching the web for some "fake viruses" and whatnot to to play around …

Member Avatar for NetJunkie
0
5K
Member Avatar for scobi

[CODE] #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <glut.h> #include <stdio.h> void drawCube(); float vertices [8][3]; int facets [6][4]; void read_file (char **argv); void init(void) { glClearColor (0.0, 0.0, 0.0, 0.0); glShadeModel (GL_FLAT); } void display(void) { glClear(GL_COLOR_BUFFER_BIT); drawCube(); glEnd(); glFlush(); glutSwapBuffers(); } void reshape (int w, int h) { …

Member Avatar for scobi
0
155
Member Avatar for blt007

Ive been having trouble solving this please help, yea its hw but im using this as a last resort as its due in 2 hours. [CODE] // Search a dictionary file for the word input by the user. // //////////////////////////////////////… #include<iostream> #include<string> #include<fstream> using namespace std; int main() { string …

Member Avatar for blt007
0
623
Member Avatar for Ich bin würdig

Can someone tell me what's wrong with my syntax.. THanks [CODE] #include<stdio.h> #include<conio.h> void FACTORIAL(int factorial=1, int N) {int y; {for(y==1;y<=N;y++) factorial=factorial*y; printf("The factorial of %d is %d", N,factorial);} } void main() {clrscr(); printf("Please enter a no."); scanf("%d",&N); FACTORIAL(factorial=1,N); getch(); } [/CODE]

Member Avatar for Narue
0
103
Member Avatar for Tom_Weston

[CODE]#include <iostream> #include <windows.h> #include <string> using namespace std; void main() { string run; cin >> run; ShellExecute(NULL, NULL, run /*<<<the error*/, NULL, NULL, SW_SHOWNORMAL); }[/CODE] I want it so if i enter a file path, it open. If i replace run with "E:/test.exe", it works... but i want it …

Member Avatar for Tom_Weston
0
172
Member Avatar for fesago90

Well, I read that endl 'flushes' the output buffer as opposed to \n. Now what does that mean (In what way could that be useful)?

Member Avatar for seanwalsh1984
0
527
Member Avatar for trejorchest

I'm trying to write the code for the Game of Life program, using arrays and for loops. I based most of my code on what my teacher did in class and modified it to fit the requirements of my assignment. I've hit a wall, though. When I execute the program, …

Member Avatar for trejorchest
0
214
Member Avatar for wannas

Hi there, I tried to compile a c++ code but got a fatal error. I should include net/netdb.h into my directory,but i can't find it anywhere. is there any website to download net/netdb.h??

Member Avatar for wannas
0
3K
Member Avatar for davidhk35

I'm up to finish an assignment for my C++, but there must be some thing wrong with the codes.... hope someone will able to give me a hand~ so...here's the title assignment: Program generates a random math problem, dealing with the : addition, subtraction, multiplication, or division of integer values. …

Member Avatar for davidhk35
0
143
Member Avatar for mukulbudania

I have made a grid and want to put text on each text block. can it be like some align command in graphics.. which allows us to align the text in each block... plz help me out with this....

Member Avatar for ravenous
0
109
Member Avatar for skylinedrifter

Hey Fox... i wrote the program for finding the Mean of 4 integers (Thanks to Daniweb members) now im faced to also get the standard deviation of those numbers x=sqrt(X1+X2+X3+X4)/3 here's what i've come up with so far... [CODE]#include <iomanip> #include <iostream> #include <cmath> using namespace std; int main(void) { …

Member Avatar for ravenous
0
1K
Member Avatar for aero31aero

Everytime I run this program and enter a new record, it gets terminated on these statements: [CODE] stud.pcent=((stud.mhin+stud.meng+stud.mmat+stud.msci+stud.msst)*100)/(mm.hin+mm.eng+mm.sst+mm.sci+mm.mat); fwrite(&stud,recsize,1,file); [/CODE] The whole program is this. It is only partially complete. [CODE] #include<conio.h> #include<iostream.h> #include<stdlib.h> #include<string.h> #include<stdio.h> #define UARROW 72 #define DARROW 80 #define ENTER 13 #define ESCAPE 27 int key; …

Member Avatar for aero31aero
0
183
Member Avatar for skylinedrifter

Hey guys... had a little problem while trying make this little program that would find the mean of 4 integers... here's what i have so far [CODE]#include <iomanip> #include <iostream> #include <cmath> using namespace std; int main(void) { int X1; int X2; int X3; int X4; int X; cout<<"Enter The …

Member Avatar for brainfo
0
140
Member Avatar for Obelisk4

Hi everybody ^^ I'm quite a newbie in loading image file, so I've try to improve myself by loading the TGA image structure (You can found it at [url]http://en.wikipedia.org/wiki/Truevision_TGA[/url], I'm quite believe in the information there) My problem is after loading and draw it onto the screen using OpenGL ES, …

Member Avatar for Greywolf333
0
967
Member Avatar for brainfo

I am a beginner in c++ and now i reached in array processing binary search. my program is being compiled but it is not showing any result. Please help me out. [ICODE] #include<iostream.h> #include<conio.h> const int n=10; void main(){ int a[n] , l , initial, final, mid,data; for(l=0; l<n; l++) …

Member Avatar for brainfo
0
130
Member Avatar for inspek

I got a matrix adjency that i want to transform in an adjency list and i got this error that i cant figure out... main.cpp|65|error: cannot convert 'int (*)[25]' to 'int**' for argument '1' to 'Ville** conversion(int**, Ville**, int) main.cpp|70|error: cannot convert 'int (*)[25]' to 'int**' for argument '1' to …

Member Avatar for inspek
0
168
Member Avatar for Cross213

What's wrong with this code, I'm getting LNK errors [CODE]#include "Queue.h" int main() { Queue <int> q; // q is an object q.showQ(); q.insert(72); q.insert(36); q.insert(43); q.showQ(); q.remove(); q.showQ(); return 0; } [/CODE]

Member Avatar for Cross213
0
149
Member Avatar for nousername19

hi everyone i have to write c++ code to implement a disjoint set class to make a maze generator. i have the disjoint set class working fine. my code for the maze generator is not working.. kindly help [code] #include <iostream> #include <stdlib.h> #include <stdio.h> #include <time.h> #include "djset.h" using …

Member Avatar for WaltP
0
414
Member Avatar for BCBTP

I am looking for a replacement for _getch(); Yes I have seen other threads like this, but they do not really satisfy my need(And I do not want to waste my time trying to write one in Assembler, as it isn't my strongpoint). I need something that is exactly like …

Member Avatar for BCBTP
0
494
Member Avatar for Tom_Weston

How to hide my Win32 console application to the system tray (placed as an icon).

Member Avatar for Taywin
0
91
Member Avatar for sunn shine

iv taken a list of bakery items from user in doubly linked list.. but remove func isnt working................ :(

Member Avatar for Taywin
0
292
Member Avatar for abhitech

Hi, I am trying to show the french character in my application , all charaacters are comming perfect in List box and Text box but some of the characters like "ƒ" are not comming properly in Text box. My application is in VC++.

Member Avatar for Ancient Dragon
0
33
Member Avatar for stereomatching

At first, I wrote something like this [code] template<typename T, size_t size> inline size_t const sizeof_array(T const [size]){return size;} [/code] but if failed, then I find a solution form the other place, like this. [code] template<typename T, size_t size> inline size_t const sizeof_array(T const (&)[size]){return size;} [/code] what is the …

Member Avatar for vijayan121
0
177

The End.