49,761 Topics
| |
Hi i have about 5 types of strings having information in each string i need to transfer them into a binarytree so i need them in one node only i cant work out what i have to do.. every time i add a string it adds a node i want … | |
Hello, I am new to C++ and very lost. I have attempted this program but my output displays file was unable to open. I am not sure I am even on the right track. Here is my project: Write a program that reads strings from a file into a vector. … | |
I'm working on a lab for my C++ class that is the first to use classes and objects. It requires a search function that lists tasks found for a target course. I can't get the search function to work. Here is the relevant code: from main source code: [CODE] void … | |
Can u help me guys. I have problem of calling function from class and overloading. When I'm trying to print short int type number, the program brakes down. No errors are shown which tell me whats wrong. [CODE]#include <cstdlib> #include <iostream> using namespace std; int i=0, j=0, zero_fill, l=0; class … | |
How would I make a file with Unicode characters in it? I don't know why this is so difficult to do, in any other language, you don't even have to specify that it's Unicode. This is what I have [CODE] #include <iostream> #include <fstream> using namespace std; int wmain() { … | |
Hey guys, now I have an assignment to create code that will ask for a number and then calculate the factorial of it with a for loop in a separate function and return the value to main.. Here is my code, I think it looks pretty good, but when I … | |
my insert function of redblack tree is working good for input checks listed as comments in main() say for 10 to 20 numbers which has included all types of color changes and rotations.. i am providing input of 1000 numbers to be inserted from input file "in 0" attached. i … | |
Ok this comes as two questions: what is the best variable for storing bianary data and how would I send That through a XOR gate? When I searched it didn't really do anything because XOR is a binary operator. I remember how to open o file in binary form from … | |
Hello guys, I'm trying to make it so that the user can opt to change student's course code or credit points (they can choose to change neither, either or both) in case 5 of my main switch statement. The problem is, the loop doesn't end after you choose to do … | |
Hello everyone, I'm new to C++ and I have two assignments that I to work on. The first how do I write an algorithm that will search for the smallest, largest, and average out five random numbers. This is what I have so far for my algorithm: 1. Get value … | |
i am doing a project on student information system using file handling...i made my own project but it didnt work....i read many books but actually the main problem is that i lack logic.....i have found from the net this project but the output on the notepad file is giving unusual … | |
Hi friends im trying to get my menu working but i just cant seem to get it working ... these are my 3 errors 9 " In file included from main.cpp" 47 " no matching function for call to `Menu::Menu(const char[7])' " 49 "std::string' has no member named 'add' " … | |
What is cout? It's a variable, yet it can print stuff on the screen. Also, << (Left Shift Operator) isn't like the one for the variable cout. How does cout work? cout isn't even a macro / #define. | |
Ok pretty simple: How to make internal speaker beep on Linux. For personal use does not need to be portable. I know I have an internal speaker... BIOS loves that thing... | |
Hey forum, our professor assigned us a program we have to write in assembly language and I would love to have help on it. [QUOTE]Write an upper-to-lower case and lower-to-upper case conversion program. When the user inputs a letter, your program should convert it to upper case if it is … | |
Hi all, I have this code here and I like to save all the messages into 1 text file name contimer.txt. I've tried to do [CODE]FILE *output fopen_s(output,"comtimer.txt", "ww");[/CODE] right before the function Timer 1 and change every "printf" function into fprint_s(f, "Message", variables) but it does not help. Could … | |
Hi im trying to get this to compile im try to make a menu this is my code but it wont work [code] //main.cpp #include <iostream> #include "Menu.h" using namespace std; int main(){ { SportsClothingMenu(); } system("pause"); return 0; } [/code] [code] //Menu.h #ifndef H_MENU #define H_MENU #include <iostream> #include … | |
hi everyone. I just switched over from a linux os to a mac osx. I have seen multiple suggestions on how to compile c++ but it won't work for me I have x code what do I do? | |
I figured this would be easy but ultimately I can't seem to get past the " " in a char array. i.e. [CODE] const int ARRAY_SIZE = 80; char charArray[ARRAY_SIZE]; cout << "input a sentence"; cin >> charArray; [/CODE] "This is a test string" returns only "This" as the space … | |
Hi, I am using WinSock library for sending data over network, and I have a problem. I know how to send data in one struct and receive it on the other side, because there is constant size of structure. But what if I have more structures, each one with different … | |
I'm trying to reverse a string in pairs Example: input - heaven output - ne va eh My code seems to be right until the last for loop... That's where I need help Here's my code: [CODE]#include <iostream> #include <string> using namespace std; string revString(string user); int main() { string … | |
Hi, I have received an application that stores some properties in a file. The existing struct looks like this: [CODE] struct TData { UINT uSizeIncludingStrings; // copy of Telnet data struct UINT uSize; // basic properties: TCHAR szHost[MAXHOSTLEN]; //defined in Sshconfig UINT iPortNr; TCHAR szTermType[MAXTERMTYPE]; // login properties: BOOL bTelnetLogin; … | |
Is it really hard to find someone who know how to make a good use of stl and combined the power of GP and OOP?Like the way modern c++ design did? There are so many people say these kind of techniques are unrealistic because there are only a few of … | |
I just wanted to know what famous algorithms that you should have in hand? or be familiar with? or That is always used? | |
Hi, Does anyone know how to animate object so it follows a previously drawn spline? I tried by translating all object vertices by Spline_point[i]-Spline_point[i-1] by frames but this doesn't work. Does anyone have a better idea? | |
I have a bunch of floats and I need to convert them to string to use Send command to send to a Receiver. However, I been trying to code like below where long1deg is a float. [ICODE] char long1degC = long1deg; [/ICODE] Or [ICODE] char* long1degC = new char[30]; float … | |
I dont know wats wrong with my code but what am trying to do is for salary its an addition of DA and HRA. Here is my code.[CODE]#include <iostream.h> class teacher{ private: char name[20]; char subject[10]; float DA , HRA ; float salary; public: void getdata(); void display(); int payrol(); … | |
The effectiveness of C++ and or Java Graphical User Interface (GUI) Design. | |
I have this program to write that Generate 100 lowercase letters randomly and assign to an array of characters (Chars[ ] ). Count the occurrence of each letter in the array and save them in counts[ ]. Write a main function to test the different count. What i don't know … | |
Hi All! I've got a weird problem here...It doesn't want to add my int values to a char array even though I static_cast the value to char. If you could just look at my code please! [CODE]void AltBoolean::print(){ perma = new char[arraySize]; int temp; int counter = 1; for(int i … |
The End.