49,761 Topics
| |
I'm writing a program where I have a variety of input commands. Lets say here are my three commands: info playlist # quit info - gives me information quit - terminates the program The problem: playlist # - The command playlist # means I need to cout a number of … | |
Hi all, I am trying to reading stuffs from the text file, i don't know y but program can't read off the tab space eg. it reads Hi HappyDay 325 but it can't read Hi Happy Day 325 like where we used more than one spacing for one word or … | |
what is array of void and why am I getting it in the following program? I finally have the first part done where I can loop the input. However, I cannot figure out what this array of void is. I'm getting "declaration of 'lastname' as array of void" in lines … | |
Hey guys, I have been learning c++ while working with memory management i seem to have gotten stuck, There are 2 classes Stack and Queue the stack works on the LIFO principle (last in first out) and the queue the opposite FIFO (first in first out). Now the program runs … | |
I've tried just about everything. Can anyone give me some help. | |
Hi, I'm new to the C++ community hope you guys can give me some guidance. The program I'm making is suppose to read information from a file called music.txt Inside this file there is information about songs in the following format: Bandname, Songname, Duration of the Song, Here a partial … | |
Hello, my first post here, mostly due to every question I placed on google the answer is here (normally answered by a fellow Anime fan called Narue, someone's got their thinking cap on ^_^) Anyhow the problem is as follows, I'm writing a 2D game engine using DirectX9 (not relivent … | |
Ok so im totally new to C++......we use Dev in our labs I cnt seem to figure out how to store the column of a text file into an array. I understand how to input the file usinf ifstream.The columns have Lastname(initial), Id#, Age and Gpa. i thought js doin … | |
How would I make a program that can insert text into a text field in another program? Or click a button in another program? | |
Okay, I've got a serious problem with std::vector, the code I'm working with is huge and it's got vectors left, right and center. The problem is that one of the vectors is having to reallocate itself elsewhere. This is causing the references to point to random things. For illustrative purposes: … | |
Hi folks, Fresh newbie here. I'm taking a c++ class and I'm just a beginner. We have started to learn pointers and I discovered some puzzling behavior while messing around with the address operator [ICODE]&[/ICODE]. Here is my code snippet: [CODE] char letter = 'a'; int integer = 1; char … | |
I'm having some problems trying to solve an apparent circular dependency in a project of mine. I'm working with OpenGL and FLTK to create a Robotics Simulation. The problem is that I've created a Class FLGLWindow which basically manages a window with rendering capabilities. I also have a Menu class … | |
Searched your forums a lot, found a solution to my task, but still I do not understand why do I get the wrong answer everytime. It's always a 'correct-1' result. It doesn't depend on what the number in the string is. [CODE=C++]#include <cstdlib> #include <iostream> #include <string.h> using namespace std; … | |
I'm trying to port some existing C++ code to OS X. The problem is that it doesn't want to load files to read from them. The code bellow illustrates this problem; when run from Finder it outputs "Failed to open input file.", however when run from Xcode it runs correctly. … | |
[B]Please help me how to do it. Thanks![/B] A 5-star hotel has 3 room types below: - Room type A, Price 80 USD / day. - Room type B, Price 60 USD / day. - Room type C, Price 40 USD / day. Room rental is calculated by formula: Price … | |
Hello everyone. This is not really a coding problem as it is more of a compiler problem. I am making an MFC application in Visual Studio 2005. When i open up the icon, i can edit it right there in that editor. But when i do, it works fine in … | |
all i can do is get each line at a time.... how can i read it to only read till the space.... plz help.... heres my lil bit of code [CODE] while (getline(iofile,line)) { cout << line << endl; }[/CODE] plz i know i can use this aswell for line … | |
I spent a lot of time trying to find out why "Message Box' made my program act like it crashed. Originally I had to bring up the Task Manager every time I allowed "Message Box' to run to shut down the program. After much experimentation I found that if I … | |
[B]What would be the best way of doing this?..... [/B] I have a text file containing a list of music songs that shows the artist, song title & song duration. So I'm writing a program that opens the text file & reads the duration of each song, adds each song … | |
Hi :) How do you write a program that reads a text file (music.txt) & stores it in a Data Structure. I hope that I explained this well but here is a little more info incase not [QUOTE]Write a program that reads the data from the music.txt file and store … | |
Ok, here's the deal. I have this homework project I'm working on and while I realize no one is here to do my homework I am a little confused right now with how to get a function to read into an array. I put in the entire code but I … | |
WHEN DATA IS READ FROM FILE AND I SELECT DISPLAY ALL IT FIRSTLY DISPLAY THE INFORMATION FROM THE FILE AND FILLS WHATEVER LEFT OUT OF THE10 RECORDS WITH WEIRD SYMBOLS. [CODE=cplusplus] # include <stdio.h> # include <string.h> # include <iostream> # include <fstream> #include <stdlib.h> using namespace std; typedef struct … | |
I'm making a program in Ubuntu with wxwidgets, the goal is to recognize faces but for now I just want to load an image into a frame. I load images by clicking on a load menu item which is linked to this function. [code=c++] void Face_Catcher_Frame::on_load(wxCommandEvent &event) { wxFileDialog * … | |
I have simple question. I have long code in my .cpp file with classes functions etc. I would like to divide it into separate cpp and .h files. What are rules governing the stuffing? Any good tutorial/example? Cheers :) | |
Alright i am trying to read from a file so that it opens into the array temp_array. the idea is to have the data previously added to the file open into the array so i can search it and sort it this is giving me alot of stress it is … | |
I'm writing a spellchecking program using a hash table. The hash table (a char * array) serves as the dictionary, storing words inputted from the file wordlist.txt. When I call the lookup function, a floating point exception occurs. Any suggestions you have on how to find what's causing the exception … | |
Hey, I need help keeping a http connection alive. I have used setsockopt to set keepalive to 1, and in the http packet i set keep-alive to 300, but the server replies with: [code] Connection: close[/code] my packet looks like [code=cplusplus] string buffer2="POST "+P.path+" HTTP/1.0\r\nHost: "+P.httpUrl+"\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows … | |
Summary of task: I have to write a program that adds 3 places to each char of a user input string to encrypt and vice versa for decrypting. Doesn't seem to hard, but as a beginner I am having an issue. I am having problems getting the user input string … | |
Hello, I'm writing an abstract program that keeps a record of Names and Phone numbers. I've created a Record class that inherits a Name and Phone class. All the functions work great except for delete. The delete function is supposed to replace the record value with "DELETED". The program says … | |
[code] #include <iostream> #include <cstdlib> #include <cassert> using namespace std; struct node { int info; node *link; }; void insert(node *first, node *here, int x) { node *temp = new node; temp->info = x; if (first == NULL) { first = temp; } else { here->link = temp; } } … |
The End.