49,757 Topics
| |
Hello every one im doing my project for c++ class and was trying to compere 2 elements in the array to see if the length of the string that i've read from the file are the same whenever i read a row i also store the length of it in … | |
Hello! I have this homework problem, that I thought I had figured out, but once I fixed all the syntax errors and debugged it again it gave me some weird numbers...something I totally didn't expect. Can anyone give me a clue as to where I went wrong? I suspect that … | |
I'm having trouble implementing how to get it to read every word from the document and check to see if its in the dictionary using the hash table.. Please help anyone. I'm fairly new to programming. I have to develop a spell checker program. MY program has to use a … | |
Hello. Can someone please tell me how can I get the Text from the textBox, and store it into a string for instance. To be more specific, I have a function: [CODE]foo (const char* str, const char *strat);[/CODE] And when I call it, I want it to take the the … | |
Hey guys, how would i convert the code in option ascending and descendingGPA to where it sorts all students in ascending order by lastname and all students in descending order by gpa. thanks! [code] #include <iomanip> #include <iostream> #include <fstream> #include <cstring> using namespace std; struct StudentRecord { char lastName … | |
Hi folks, I am using FindNextFile() and GetFileTime() to find a file in a folder with the latest creation time. The code is as follows... [code=c] WIN32_FIND_DATA ffd; HANDLE hFind = INVALID_HANDLE_VALUE; DWORD dwError=0; LPWSTR filePattern[MAX_PATH]; LARGE_INTEGER filesize; FILETIME ftCreate; FILETIME maxCreationTime; maxCreationTime.dwLowDateTime=0; maxCreationTime.dwHighDateTime=0; hFind = FindFirstFile((LPCWSTR)filePattern, &ffd); if (INVALID_HANDLE_VALUE … | |
the delete must be by copying the data and then deleting if their are 2 nodes from that one root. CODE IS AT VERY END FOR THAT. CALLED REMOVE. Thanks. main [CODE] #include <iostream> #include "my_bst.h" using namespace std; int main() { my_bst<int,int> ab; ab.insert(4,1); ab.insert(2,2); ab.insert(6,3); ab.insert(1,4); ab.insert(3,5); ab.insert(5,6); … | |
I am trying to create a timer that calls a function when the timer ends this is the timer class [code] class CreateTimer{ float OverallLapsed; float EndOfTimer; bool Running; public: CreateTimer::CreateTimer(float); void StartTimer(); void StopTimer(); void Lapsed(float); void SetEndOfTimer(float); bool CheckTimer(); void ResetOverallLapsed(); float GetOverallLapsed(); }; CreateTimer::CreateTimer(float EndTime){ EndOfTimer = … | |
So here is the problem. I have a file that starts with a number, this number says how many entries are in the file (5 means there are 5 names). Each entry takes up two lines in the txt file. First line is the name, the second is a group … | |
Hi, i just don't get why this isn't working. It is supposed to read from the end of a .txt and up, until it hits the first space but it just keeps repeating the last character in the text file ip.txt Any help is much appreciated. [code=c++]#include <iostream> #include <fstream> … | |
I have two processes where the First process sometimes is writing to a file and the second process is reading this file. For the second process I wonder if it is possible to only read the file if the First process does not use the file. How would it be … | |
I've been lost in this class for weeks and I have no idea how to even do this assignment. [ATTACH]12667[/ATTACH] please help! It's in the attachment | |
I would like to open from a file and then store the strings stored in the txt filed to an array.The txt file i want to open has 1 string on each line.So each line will be 1 string.What should i change here? [CODE]// reading a text file #include <iostream> … | |
Hi, I'm trying to update an objects information within my linked list but for some reason after attempting to alter the data no changes appear to have taken place. As far as I am aware I'm not updating a copy of the object because I am finding the relevant object … | |
Hi.. I'm writing a code for the cash receipt program.... before this,i already make this kind of program.. but the program that i've made before is simply doing this task only : [B] //ask the user to enter the product information... Enter the product id : Enter the product name … | |
Hello Everyone. I am creating this Windows Forms Application using Visual Studio. Basically, in order to do what I want to do, I need to use an integer, and that integer needs to be converted into a string in order to change the label text, when pushing the button. However, … | |
Hey Everyone, I have written this Matrix Multiplication program. But The Program seems to crash when during the filling of the first matrix, exactly after the completion of the first row. Here is my implementation [code] #include <iostream> using namespace std; void generate (int ** ,int ,int); void fill (int … | |
I Have a C header file which has common structures which are used by various modules. Im developing my code using C++, few of the newly written modules are in C++. We have to use the same structures defined in that C header file. What i am thinking of doing … | |
Hi, I am trying to develop one requirement wherein I need a C++ map having both Key and Value as Structures. The structures are as follows: [code] typedef struct _keyInfo { int Key1; int Key2; } T_KeyInfo, * T_pKeyInfo; typedef struct _valueInfo { int value1; int value2; int value3; } … | |
Hi all, I was going throughthe concept of Polymorphism. Can anyone explain me how the vtable and vptr are created in case of virtual base class and what all values it contains. I have idea about the vTable and Vpt in case of polymorphism that the table contains the address … | |
Hi *, I have some doubts about passing parameters to a method of a class. I am not sure if it is a problem of my design of the app or a problem of the implementation, I mean C++ knowledge. I have a class called MatrixHandler : The idea is … | |
Using "Nested For" Loop, Write a program that prints the letter M. Thank you All! | |
hi guyz, i want to write a program that will find the (sine, cosine and tangent) of adding and subtracting two variables using inheritance and polymorphism concepts. anybody plz help? appreciate the answer:) | |
Hi All, I am extremely new to C++ and would greatly appreciate any advice regarding the following question: I am trying to create a 2D array of CStrings, however it needs to be declared dynamically for my application. I have read up on numerous forums but I just cant seem … | |
hello everyone m making game in C++ and i want to know that how i can include music like mp3 or any other format music in my game?? plz help me i shal be very thank ful to u | |
Hi Everybody, If someone could help me with this problem, I would really appreciate it. I'm a newbie and trying to finish an assignment. I've gotten stuck on one thing and can't seem to find a way out of it. I've already done the searches and spent at least 5-6 … | |
Unfortunately in c++, there is really no good way go locate lines in your file without reading the entire file 'character at a time.' So, if you [I]have[/I] to read only a single line from a file, we know we are at some point going to have to be inefficient... … | |
Old fart here, still a horrible newbie. Tonight, I've actually got a working solution for my problem, but the book I'm reading is unclear about something, and I'm having trouble getting Google to give me the the exact answer I want. Given, [CODE]//Header junk //CandyBar struct int main() { CandyBar … | |
Essentially what I'm trying do with nested statements is that when I enter the the second switch stament and when I exit the second switch statement it goes back to the first switch statement menu. Currently the current code exits the entire program after the second switch exits, which of … | |
Hi all, i tried to encrypt and decrypt the files, that was successful,, but i wanted to reduce the size of the file and then decompress or decrypt it ..Nothing happening now. Any help will be really appreciated. Thanks |
The End.