49,761 Topics
| |
I'm having a little trouble getting started on this HW assignment and would appreciate if anyone could clue me in where to begin logically. The program takes names from the user as input up to 200 names or they stop and stores them in an array then uses two arrays … | |
Tool.h file [CODE] #ifndef TOOL_H #define TOOL_H #include <string> using std::string; const int LENGTH = 30; class Tool { Tool ( int = -1; string = " "; int = 0; double = 0.0 ); public: int getPartNumber(); int setPartNumber( void ); char getToolName(); int setToolName( void ); int getInStock(); … | |
Hello i have a code here that partially works...the point in the program is to store 10 array integers then outputs how many times that integer is entered ex. input: 1 1 1 1 1 2 3 3 2 99 output : 1 = 5 2 = 2 3 = … | |
Basically everyone should laugh at how stupid this may sound but this code is somehow wrong... which is funny because it is as simple as hello world.... [CODE]#include "stdafx.h" #include <iostream> using namespace std; int main(void) { cout << "Wake up, Neo.\n"; Sleep(6000); cout << "The Matrix has you.\n"; Sleep(6000); … | |
Hey, im new to the forum and im trying to learn c++, so i bought a book. On a programming exercise i was asked to create a program that would take a persons full name, letter grade, then subtract the letter grade (ie: A to B), and age and display … | |
Going through a text to help cement my knowledge of C++ but found code that wasn't explained and looks kinda odd to me. [CODE] #include <iostream> #include <string> int main() { using namespace std; char ch; int count = 0; cin.get(ch); while(ch != '\n') { cout << ch; ++count; cin.get(ch); … | |
Hi everyone, I'm a moderately experienced C++ programmer who's trying to do a little socket work. Don't ask why, but I'm to write a program which, when activated, sends an HTTP POST request to a remote end server. The socket part of the work is done and successfully tested; all … | |
Hi i hve to turn in this homework today and i have not been able to come up with the logic here is what it is need it and what i have wrote so far if you are interested i am willing to pay for it, thanks Program Description: A … | |
Okay so this is part of an assignment I have to do, but I am confused regarding the library routine as my professor has not covered it well. So my thing is what do it do to create the library...is it just a .h file with all the functions specified … | |
Why won't this if statement compile? [CODE]int main1() { char o[15]; cin >> o; if(o == 'oscar') main2(); else cout << "\n\aIncorrect password.\n" << endl; main(); cin.clear(); cin.ignore(255, '\n'); cin.get(); return 0; }[/CODE] I am trying to set a password to access the program | |
How can I get a password that has been changed during the use of the program to be applied so that after the program is ended and started again, when it prompts for a password to start the program it wants the new password the user entered, not the original … | |
Hi, I'm using istream_iterator to read input from standard i/p and writing it to standard o/p using ostream_iterator. I expected it to print the input to the console when I hit enter and then exit but it loops for next input after printing and so on. [code=c++] #include <iostream> #include … | |
I need to create a C++ program, that one could get a list of suggestions when he's typing. for example: when we type the letter 'A', a list of words that start with the letter A should display. then when we type another letter 'P', the words should filter and … | |
Ok well my assignment is to write a program to gives me the total resistance in a circuit. The user is prompted for the resistance type and resistor value such as <1 200> 1 meaning in series, and 200 being the value of the resistor. When the user imputs -1 … | |
[COLOR="Red"]4.6 - Insert() vector argument specs. Iter or not?[/COLOR] This allows me to refer to the second spot in a vector named 'inventory': A) [CODE] vector<string>::iterator myIterator; cout << "\nYou found a compass"; inventory.insert((inventory.begin() + 1), "compass"); cout << "\nYour items:\n"; for(iter = inventory.begin(); iter != inventory.end(); ++iter) cout << … | |
How do i split a string word by word and store each word into a hashtable? please help Thanks, Saula | |
hey whatzzzup guys??? i just want to know if this c++ programming language is hard co'z my clasmates are keep on complaining abort that hehe | |
Hello, I am trying to write a simple program which listens to some data on network and writes to a file. I decided to use mmapped files because the data is very large (magnitude of 3-5 Gigs) and very fast. so as expected, i put the data in queue and … | |
please help me to get the month only from system. which mean the program dont need to display time , day and also year. how to do with it? i only know to display date. urgent, assignment needed. thanks alot first. | |
Ok i have had to post this a few times just to get a answer. I am trying to get a user to put in a answer to a question in a c++ console program and when he does it puts his answer into a .txt and sends it to … | |
G'day all... I know there's a sticky in this forum for books that are recommended as C++ references from newbies to advanced coders. What I'm wondering is this... What are the online resources you [B]most[/B] recommend for C++ coders? What I'm looking for are those resources that are so useful … | |
I can't seem to disable dynamic linking. How do I do this? I've tried the following: [CODE]babbage-dasnyder 19% mips-unknown-linux-gnu-g++ -static -static-libgcc hello.cpp babbage-dasnyder 20% file hello hello: ELF 32-bit MSB MIPS-I executable, MIPS, version 1 (SYSV), for GNU/Linux 2.4.18, dynamically linked (uses shared libs), not stripped[/CODE] But as you can … | |
I am learning wxWidgets to break free of console programming. I use Dev-C++, and I have installed all necessary DevPaks, and everything should work fine, except when I try and compile this code, I get: [Linker error] undefined reference to `WinMain@16' ld returned 1 exit status C:\Dev-Cpp\Makefile.win [Build Error] [Testing.exe] … | |
Hello, I am coping a problem with getline. I have a txt file that looks like the following.And my task is to read it and put them in a file that contains 10 columns and not 8. [CODE=plain]0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,1 0,0,0,0,0,0,1,0 0,0,0,0,1,0,0,0 0,0,0,1,0,0,0,1 0,2,2,1,0,2,6,5 12,17,12,28,39,40,46,71 [/CODE] and I have to read … | |
It's been so long since I sat down and coded something that didn't require me to think about what I wanted to code before hand; Can anyone give me any ideas about a cool program to make? I can effectively utilize CreateThread() and such from the Win32 API if that … | |
Hey guys, my friend helped me with a code, but I didn't get a chance to ask him about why col is subtracted by 65? Can anyone tell me what exact that line is suppose to do. Thanks for dealing with me...the line is bold... [CODE]#include <iostream> //preprocesser directives using … | |
I have a list of books that I need to access from 3 or 4 different functions of my program. It's 250 books with unique names. Would it be wise to use simple array to store the list? Or is there any easy way for a newbie to manually create … | |
In my book, it says find() must be used like so: ex: iter = var.find(scores.begin(), scores.end(), score); but later it uses this in practice: ex: while (used.find(guess) != string::npos) Why can you simply pass 'guess' var to it here and not need to search a range? Isn't find() an algorithm … | |
Still learning and I just want to be sure I'm clear on a few very basic syntax issues. Any help is much appreciated. [COLOR="red"]5.1 - Basics[/COLOR] int = a single number? char = a single letter OR number? string = a phrase of letters (up to?) char array[]; // array … | |
I have a question on Chapter 4, exercise 1 of Michael Dawson's "Beginning C++ through Game Programming 2nd Edition". The chapter goes over STL, vectors and iterators. The assignment is to create a program that allows the user to edit games in a list. In the book we learn about … |
The End.