49,757 Topics
| |
Help with a c++ code to convert base 10 to base representation using stacks and queues ADTs protocols. | |
Hello, I am doing a file input/output. I wrote 3 fulls names, phone number, balance. etc inside my input file. Example: John Doe 555-555-5555 5000.00 In my output file, I am trying to create this output with using setw. First Name Last Name Phone Number Balance ------------ ------------ ----------------- --------- … | |
When I have [ICODE]sizeof(utmp)[/ICODE], 384 is returned. So when I try to find out the size of the individual members, I get a different result. Using the method below, I come up with 382 bytes. Anyone know where I'm missing the other 2 bytes? [CODE=CPP] #include <iostream> using std::cout; using … | |
fatal error C1075: end of file found before the left brace '{' at '.\project4.cpp(75)' was matched i am getting an fatal error and dont understand how to fix it, most help is appreciated [CODE] #include <iostream> #include <iomanip> using namespace std; void displayTitle(); int getMonth(int month); int getDay(int day); int … | |
The following steps tell how to create a project file to play a wav sound file 1- create a project file. 2-Choose Console Application in Basic tab. 3-After Create the Project File go to Project Option 4-Choose Parameter tab 5-Click the Add Library or Object 6-Browse the location of Dev-c++ … | |
Before I start, I'm sure you've all seen this error, and explained how to solve it many times before, and for that I thank you for bothering to read this, and if you choose to answer, I wish to thank you in advance. So, the issue I am having is … | |
What is the way to convert this int to a std::string. I have searched MSDN and found that itoa could be used (vs atoi for string to int as I know how it is done). Though I cant find any good example that shows how itoa is used or if … | |
I am using a "GriedViewControl" with 14 columns and with this code below I can set the number "1" to the First Column and 21 Rows down. What I wonder is how I access for example [COLOR="Green"]column 3 and row 1[/COLOR] or [COLOR="green"]column 4 and row 2[/COLOR] etc... What is … | |
I have to write a program to read 10 integers into an array. It will then read in one more integer. My program should then compute and output how many distinct pairs of integers in the array add up to the last number that was input. Note I cannot use … | |
The error is: F:\C ++ Numerical Methods\Newton_Raphson.cpp(199) : fatal error C1004: unexpected end of file found [code=C++] #include <cmath> #include <iostream> using namespace std; double F ( double X ) { return pow ( X, 4) - 9*pow ( X, 3 ) - 2*pow (X, 2) + 120*X - 130; … | |
This has been driving me nuts for the last half hour or so. Google didn't help. I don't know which function returns the nth character in the string. I know that it is supposed to be something like this stringname.something(n?) If someone could post the function and an example of … | |
Hey there; I've run into a problem! I have a program that is supposed to do multiple things. Therefore - I have a menu (switch statements). Is there any way I can make it so when 1 statement finishes, it can go back to the main menu? I can add … | |
hi im new to c++ and at the moment trying to write a program that generates random numbers and then sorts those numbers using bubblesort. So far ive managed to get the random numbers working but i am unable to sort the random numbers with bubblesort ? [code] #include <iostream> … | |
hi i am new to eclipse i wrote a small programm in c++ using operator overloading if i compile normally no error but if compile through eclipse it is giving erorr message like "operator not mached " /*************************************************************/ this my main.cpp ************************************************************/ [code=cplusplus] #include <iostream> #include"use.h" #include"friend.h" using namespace std; … | |
I am confused in tellg funtion can any body tell me its syntax also for seekg();. | |
Hi, I want to use linked list in the linked list. In the following code i would like to introduce new public member as species which has four to five members. How to modify the code to add new member species? In the class TREE, I would like to add … | |
Hello, I am having a problem for coping the string into a 2d array.. Also if the length of the string is more than 16 bytes how to continue to read till end of string.. Can anyone help.. [code=c++]int encrypt() { string text = "Encryption"; char b1[4][4]; text.length(); strcpy(text,b1); // … | |
I am having trouble figuring this out. I only have one error and it is in main. I am trying to write a program that will output first just a random sudoku type grid(function called random), then I am trying to output a sudoku type grid that has no duplicates … | |
1st off, Im new to C++ programming. I created a function to calculate garage parking charges. I keep getting this last error: HourFee.cpp(65) : error C2065: 'ROW_SIZE' : undeclared identifier this is my error ---> ***int vehicleInfo[ROW_SIZE][COLUMN_SIZE];*** [code=cpp]void calculateCharges() { int x; int r; for (x=1; x<=10; x++) const int … | |
Hi i have my code that finds every instance of my search criteria in a text file and tells me the position in the text file it is located at. The next step i want to do is stream the bytes that follow each instance of my search criteria into … | |
Hi guys, I have an input file as below (it is a family tree): 1 0 0 2 0 0 3 0 0 4 1 2 5 1 2 6 0 0 7 3 4 8 5 6 9 7 8 10 7 8 where column 1 = individual number … | |
Hello, I'm new to programming and I have a simple project to plot a graph using gwin. The graph should just be a series of circles curving upwards on the y axis, the amount of plots should be defined by the user. I think I have everything almost correct but … | |
SO here it is; start with an array that couts random numbers I used the generate function now check those numbers if they repeat so return true if false is returned then you can go onto the next random_integer to check..here I use the contains function the problem is generate … | |
Hey guys, new poster here. I'm rather desperate here, I just do not understand the concept of templates very well. I've used the search function, but I don't see the problem addressed in any other threads. Any help is much appreciated. My assignment is to create a templated vector class … | |
the string is to be split using operator overloading as Krishnamoorthy(pointer member operator)m(pointer member operator)moorthy | |
i am unable to understand the logic to be used. can u pls help me write the program | |
I need help Fixing this I traced through the code, and it compiles not error but when I run the program its just goes crazy I need help finding a the soultion to this problem please Thank you very much [CODE]#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int … | |
Hello, I am having a problem to call a function I am posting the code... Can anyone help how we can solve the problem... [CODE]int AES(string path1, string path2) { ifstream myfile1 (path1, ios::binary);// error ofstream myfile3 (path2, ios::binary);//error } int main() { AES( "c:/plaintext.txt" , "c:/cipheretxt.txt" ); return 0; … | |
Hello everyone, I need to write code such that: .you can select number of players(2,3or4) and put that number in array.. .display message if correct number not entered. .then each player must be able to choose their color(red, blue, yellow,green) .two players cannot be assigned the same colour This is … | |
Hi, When I am trying to return a QString from a method I am getting linker error. My code is like: extern "C"{ _declspec QString _stdcall function1(char* name); } I am using MSVC 6.0 compiler. Could any body help me? (NOte: If I remove _stdcall its working fine) Thanks in … |
The End.