Beginners - June 2013 (Page 7)

How get a few words from input cin with spaces between them?
 
HI! Suppose this piece of code : #include <iostream> #include <string> using std :: cout ; using std :: cin ; using std ::string ; int main () { ...
[1 reply] : use getline(cin, line), it is part of the standard library. http://ww... (by pata)
.exe for distribution
 
Hi all, I’ve recently finished writing my first game for the command line using Notepad++ and the MinGW compiler (I’ve noticed that many people use an IDE...
[2 replies] Last: give your friends your source code and have them compile it on their c... (by NSharbz)
by pata
[] operator confusion
 
Im following c++ primer and they give and example of using the operator to im guessing assign to a string. This is the code they use: #ifndef SCREEN_H...
[3 replies] Last: I think it is a way to use the string class constructor string(size_t... (by AbstractionAnon)
While loop using !not operator
 
I don't know how to use my not operator for char B, C, and D I can only get it to work on one condition #include<iostream> #include<string> ...
[2 replies] Last: Oh ok thanks, maybe it didn't work because I kept using the or opera... (by bigdog225)
by hanman
convert Matlab code to C++
 
Dear C++ Forum user. I am new to C++ I would apreciate your help on this topic. I am writing a basic GUI program to send data to a machine via RS232 and ask ...
[no replies]
How to check if a string is "0" ?
 
HI! when i write : string tmp ; cin >> tmp; if (tmp== "0") cout << "Zero" ; //or instead of upper line : if (!tmp.compare ("0")) cout << "Zero" ; I see...
[1 reply] : string tmp ; cin >> tmp; if (tmp== "0") cout << "Zero" ; There is n... (by Disch)
Books buying suggestion needed
 
Hi friends how are you doing. Actually I want to buy a good book on c++ after reading which I could be a master in this amazing language. I know its not possibl...
[7 replies] Last: Friends Experimenting with all the your suggestions so far, i think i ... (by ErrorFree)
Structures related problem
 
Make a structure named as Employee, containing two member variables name of type char and salary of type float. Make an array dynamically querying the size f...
[1 reply] : SOLVED BY MY FRIEND wiserehan@gmail.com //////////////////////////////... (by Abdullah PAKISTANI)
rvalue/lvalue problems + compiling issues
 
Hello, I'm VERY new to the C++ language. I'd also like to note that I only have minimal experience with one other language, GML. I've been watching the antiRT...
[2 replies] Last: Sorry about the semicolons, again I'm new. Thanks for the answer, I'll... (by AnonAnarch)
inline funcitons
 
Hello, I made a function to change color in console using <windows.h> because it's name is too long. Since its not recursive function, I used inline, But I am ...
[1 reply] : I think that there is no a difference because modern compiles can inli... (by vlad from moscow)
error in compiling
 
# include <iostream.h> int main() { int array ; int i,j; for (i=0;i<7;i++) { for (j=0;j<3;j++) { cin>>array ; } cout<<endl; } for (i=0;...
[1 reply] : Hmmmm...someone correct me if I'm wrong but I think it's because you'r... (by ENIGMAx)
by cshu
fuctions and passing arrays by value
 
This payroll program I have works perfectly, but I need to add in the input validation for not accepting negative values for hours worked and numbers less than ...
[no replies]
Vote for which book is best for beginners
 
Hi guys this is a vote not a question(kinda is). Should i read to learn the basics 1.C++ All-In-One Desk Reference For Dummies 2.C++ For Dummies, 6th...
[17 replies] Last: Thanks for your comments they were helpful. (by closed account EwCjE3v7)
sum of array elements
 
# include <iostream.h> int main() { int array ; int i,j; for (i=0;i<7;i++) { for (j=0;j<3;j++) { cin>>array ; } cout<<endl; } for (i=0;i<7;...
[3 replies] Last: int row ; for (int i = 0; i <7; i + +) for (int j = 0; j <3 ... (by ar2007)
Understanding Classes
 
All, I have a programming question about classes. I’m reading and re-reading about them. I understand the general idea, not claiming to know all there ...
[1 reply] : There's a lot that could be written about this, but you're best off do... (by MikeyBoy)
by a sk
Missing symbols and PDB files
 
I am using Microsoft Visual Studio 2010 Express (installed today) on Windows 8 64-bit operating system. Trying to run a very simple C++ program and get these un...
[no replies]
else if problem.
 
I just learned if statements like 3 days ago and was just messing around and came up with this.But than when i type 2 it said thank you or and other number..it ...
[7 replies] Last: I must say that the program works, however, with the exception of the... (by MikeyBoy)
where is my mistake?
 
can someone show me my mistake in this exercise? here is my code : #include "stdafx.h" struct cylinder_coor { double r, phi, z; }; struct car_coor...
[1 reply] : You may not define a function inside an other function in C/C++/C#. (by vlad from moscow)
Basic C++ Programs
 
HELP!! I am having trouble figuring out what the following prints out: 1. for(r = 1; r < MAX; r++) for(s = 0; s < MAX -r; s++) if (ary < ary [s ...
[1 reply] : $ dict homework Studies or other preparatory work done prior to some ... (by ne555)
Stationery Ordering System
 
Please help me with this group assignment which I have to pass up on 8th July. I tried to get this work, but it always have errors. The question is form her...
[6 replies] Last: it should be something like this I think : cin >> Bluepen ; while (Bl... (by Ardeshir81)
June 2013 Pages: 1... 56789... 49
  Archived months: [may2013] [jul2013]

This is an archived page. To post a new message, go to the current page.