49,761 Topics
| |
i teach a high school c++ course. i would like to use a window for user interface instead of dos console. could anyone provide me the basic code to display "hello world" in a window? and if possible a link to the code necessary to use window api for c++ … | |
I am trying to write a phonebook program that uses a dat file to store the numbers (ex. in dat file--John Doe 5554445555). I have it to the point when the user keys "John" in, it will display the number. If the user keys in "John Doe", it will not … | |
hi.. i'm pretty new with C++, so pls. bear with my question, simple as it may be. can anyone pls. tell me what this error mean: [I]syntax error before `<'[/I] i have a whole bunch of them when i try to compile.. if needed, i'll post up the codes. Thanks! | |
I am wondering if someone could tell me what tools I will need to compile and build and executable of Dev-C++ for Fedora Core 3 to install it and run it. I have never worked with Delphi source code and I would appreciate any help with the process and what … | |
I'm currently writing a game in DirectX without using the MFC structure. I am manually crating the window by including windows.h and manually creating the window by using windows functions. I am a bit confused when it comes to using strings. I would like to use the CString class, as … | |
The following code is not performing correctly. It opens the username file but does not display the mark. [code]#include <cstdlib> //these commands are pre processors directive #include <fstream> //required for library function #include <iostream> #include <cstring> #include <string> using namespace std; int main() { cout << "Marking Program"<<endl; string username; … | |
Write program that reads some information of 10 students (name [max 15] , level number , #of points , #of hours , GPA , student id ). These fields should be filled for each student by user except GPA. The GPA (max: 5) should be calculate it by function that … | |
[SIZE=4][COLOR=DimGray]please I need your help inthis program because I do not under stand what does he want and I didn't under stand the array so please help me[/SIZE][/COLOR] Write a function named "eliminate_duplicates" that takes an array of integers in random order and eliminates all the duplicate integers in the … | |
The following program executes without any errors, but the output is not what is expected. The code is correct down till the opening of the MarkScheme.txt file, but the student mark is not displayed on the screen, any thoughts [code]#include <cstdlib> #include <fstream> #include <iostream> #include <cstring> #include <string> using … | |
Anybody could tell me what's wrong with the following code? It complaints: 13 C:\apps\Dev-Cpp\projects\14\14_1.cpp ISO C++ forbids defining types within return type Thanks in advance. [code]#include <iostream> #include <cstdlib> using namespace std; struct vector { double x; double y; friend ostream& operator<< (ostream&, vector); } ostream& operator<< (ostream& o, vector … | |
Hello everyone. My instructor has asked me to write a program that accepts a string as input from a user and prints the string in reverse. I have to use a "for" loop to reverse the string. I am also suppose to allow the user to input more than one … | |
Hi, everyone. You may have probably heard this a hundred times, but I am new to programming and I am taking an intro to C++ class. I have a program that I have written, but I can't understand why it will not exit gracefully. This is what I have written, … | |
please where is the error in this code doesn't run [code] #include<iostream> #include<cstdlib> using namespace std; int main() { int ages[1000]; int size=1000; int i,a,b; for( i=0;i<size;i++) { ages[i]=rand(); for( a=1;a<size;a++) { for( b=size-1;b>=a;b--) { if(ages[b-1]<ages[b]) { i=ages[b-1]; ages[b-1]=ages[i]; ages[b]=i; } } } } cout<<ages[i]; return 0; } [/code] Code … | |
Hello, as you well know I've got a hangman game produced, I now have the luxury of adding to the code since all my work is completed ...yay, well, I've decieded to take it a step further and draw out the hunged man! I have the drawing , its just … | |
how do I get my calculations like ex. I want to add up the average gallons used per mile for a car if the car went like 1450 miles and used 62 gallons of gas I dont want it to be a whole number i want it to be like … | |
:evil: The following C program is mainly written to work as an address book. I have written the code but the VC++ compiler shows four errors and I cant find them :rolleyes: . Can some one please help me find them..my assignment deadline line is on the 10th of this … | |
[U][B]i only want what you think, the anser is, this came in a exam paper last year, am not sure what the answer is, can anyone help and explane what hes after please[/B]Using access and visual basic or c++ or pascal[/U] i've been told something like this will come again, … | |
Hello here is a site that contains lot of tutorials for C/C++ programming. Hopefully u will find them useful and also u can download the source code. [url]http://www.mycplus.com/[/url] | |
so im trying to write this program that converts Fahrenheit to Celsius and vice versa but im gettin an infinate loop at the menu. i go to select the number that i want and it just displays the menu again, i though i was doin it right? [code]#include <iostream> //for … | |
i know this is a vb assignment, but my tutor want me to do it in vb or c++ with access, i need to create tables with access, i can see two tables but am sure there another one, i know css is a table and pencil is also a … | |
[I]Link removed due to illegal content. If you feel this change was made in error, PM me with proof of legality. -Narue[/I] This site contains 1700+ ebooks on php, Java, access, .NET, c#, UML, Perl, c++, linux, sql server, asp.net, Oracle, db2, xml, javascript, unix, flash, cisco, excel. | |
This is a short list of recommendations on how to use C++. My experiences are from using gcc 2.8.0 and Visual C++ 6.0. I had to have things compatible between these two compilers, and between Unix and Windows. [b]Contents[/b] [color=#800080]IO of binary files[/color] [color=#800080]When are destructors called for local variables[/color] … | |
I am trying to make the random generator fill my array with no duplicates. An diplay the in order but aslo first line to print array[0], then second line array[0] and array[1], so on and so on until it display all twenty on one line. Pease help [code] #include <iostream.h> … | |
Hi, Ran into another issue with my program. In C or C++ is there an easy way to skip the linefead at the end of a record (hex 0a)? Thanks, | |
I'm trying to get the computer to compare a username and password entered by the user to a username and password in a text file. If a match is found, then I am going to present the user with other options. I think there must be an easier way to … | |
hello experts!!! im just a beginer.. thats wants to know alot.. i want to program my own tictactoe game.. but i dont have visual basic..can anybody plz.. give me some codes that i can edit my self with javascript or html.. if possible? can you make a tictactoe game with … | |
Here is the code: [code] #include <iostream> #include <cstdlib> using namespace std; class student { public: void inputScores(); // Prompts user to enter 2 quiz, a mid term, and a final score; store // them in corresponding data members. void computeGrade(); // Compute average and then convert the average to … | |
i need help to rewrite this in infix to postfix using class. it was in a struct format at first, now i need to format this in a class version. [code] #include <iostream> #include <cstring> using namespace std; const int SIZE = 20; private: int top; char num [SIZE]; public: … | |
How do you convert a string to an int? In my book under string functions, it shows this short example: [CODE]ia = atoi ("-123.45xyz"); [/CODE] which says that ia = 123. So, I tried applying this to my code. [CODE] index = atoi (a.GetCode()); cout<<description[index]; //a.GetCode() returns a number string … | |
Can anyone give me an idea how to convert an int or decimal number into hexadecimal? I know how to do it for binary by dividing by 2 and using the modulus % operator, but how do you take into account a b c d e f if the integer … |
The End.