49,757 Topics

Member Avatar for
Member Avatar for ChaseRLewis

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); …

Member Avatar for mike_2000_17
0
84
Member Avatar for phummon

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 …

0
145
Member Avatar for pepemongo13

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 …

Member Avatar for Fbody
0
459
Member Avatar for aranjan

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 …

Member Avatar for mike_2000_17
0
154
Member Avatar for Rickay

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

Member Avatar for Rickay
0
114
Member Avatar for Rickay

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 …

Member Avatar for Rickay
0
149
Member Avatar for Agni

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 …

Member Avatar for Agni
0
194
Member Avatar for localp

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 …

Member Avatar for mike_2000_17
0
348
Member Avatar for kbpszs

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 …

Member Avatar for inoffice
0
4K
Member Avatar for crapgarden

[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 << …

Member Avatar for mike_2000_17
1
144
Member Avatar for smoothe19

How do i split a string word by word and store each word into a hashtable? please help Thanks, Saula

Member Avatar for Andreas5
0
135
Member Avatar for yap.nice

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

Member Avatar for akilank
0
156
Member Avatar for alokjadhav

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 …

Member Avatar for mike_2000_17
0
2K
Member Avatar for gahhon

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.

Member Avatar for gahhon
0
4K
Member Avatar for ZlapX

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 …

Member Avatar for Duki
-6
139
Member Avatar for Lusiphur

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 …

Member Avatar for mike_2000_17
0
367
Member Avatar for dansnyderECE

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 …

Member Avatar for mike_2000_17
0
311
Member Avatar for steventaal

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] …

Member Avatar for Stefano Mtangoo
0
216
Member Avatar for neuelen

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 …

Member Avatar for neuelen
0
104
Member Avatar for steventaal

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 …

Member Avatar for koye.0019
0
78
Member Avatar for emcyroyale

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 …

Member Avatar for Ancient Dragon
0
167
Member Avatar for maplax

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 …

Member Avatar for mrnutty
0
109
Member Avatar for crapgarden

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 …

Member Avatar for LevyDee
0
105
Member Avatar for crapgarden

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 …

Member Avatar for Ancient Dragon
0
234
Member Avatar for crapgarden

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 …

Member Avatar for mrnutty
0
332
Member Avatar for flyingguitar

Hey Guys, I'm having some trouble compiling my code. it says that there's an error in one of apple's header files. /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/usr/include/arm/_types.h:13: error: expected constructor, destructor, or type conversion before ‘typedef’ nvm, solved

Member Avatar for flyingguitar
0
109
Member Avatar for Rickay

I am trying to get the following code to take in either a number or an integer, determine whether what the user inputted is an integer or a letter, and then print a random digit if it is an integer, or a random letter if it is a letter. [CODE]#include …

Member Avatar for jonsca
0
238
Member Avatar for eng.M

[COLOR="Red"]Help me .. I can not understand this question.. What does the following function do?[/COLOR] void insert(int a[], int& n, int maxsize, int index, int key) { if (index < 0 || index > maxsize-1) { ; } for (int i=n; i>index; i--) { a[i] = a[i-1]; } a[index] = …

Member Avatar for eng.M
-1
93
Member Avatar for Brian Perrigan

Can someone help me develop the pseudo code for this so I can try and code it out? I'm getting confused about how to develop this simple program: Problem: Develop a Null Cipher Coder using Nested Loops and Command Line Arguments: Encoded .cry files can be found here: I downloaded …

0
58
Member Avatar for shaynerossum

Thank you for reading my thread. I am experiencing an issue using struct tm and I can't figure out what I am doing wrong. I have looked at several examples and read up on the structure, but to me it all looks right. I would appreciate some fresh eyes on …

Member Avatar for shaynerossum
0
421

The End.