General C++ Programming - April 2013 (Page 16)

by areej
my q
 
Enter a number of integer values in the first edit box. Click Accept button after each entry in order to accept the integer number. Clear the edit box after ea...
[no replies]
C++: Reading from file and delimeters?
 
I have a file that looks like: Student ID:88152; Grades: 83.67, 92.45, 74.43, 97.95, 76.45; Name:Abercrombie, Neil Student ID:92485; Grades: 77.65, 92.31, 60....
[1 reply] : sounds like a job for getline(fin, str, ';'); (by Yanson)
2D Array programming questions
 
first time here just like to intoduce myself, my name is chris. im taking a programming class and obviously im stuck lol. im creating a program that asks the us...
[5 replies] Last: alright i seriously cant fill the array can someone please help. Here ... (by thatonenewguy)
cin not waiting for user input!!!
 
Hello, since around 2hours im really fighting with the cin command. It doesn't matter what exactly im trying, it's just not waiting for user input and keeps di...
[4 replies] Last: ^ unnecessary complicated. > It's the endl you have after the first c... (by ne555)
by Aceix
Meaning of some expressions
 
bool operator()(char const *a, char const *b) { return std::strcmp(a, b) < 0; } So what does the return statement mean? Aceix.
[3 replies] Last: You should take a look at the link provided above, strcmp can return a... (by Smac89)
iso forbids comparison between pointer and integer
 
hi im trying to make a program that prints out an 8 by 8 board with 1 queen on each row For example, if the user enters: 0,3,4,0,0,7,6,7 the program should cre...
[7 replies] Last: ok got it thanks for your help and youre right that is a silly input i... (by fresheze13)
When to use else if
 
I have a bit of code where doing else if after an if is a different outcome than if I just do another if after the first if . (Sorry if its a bit confus...
[2 replies] Last: Note that there is no "else if". Your second example is equivalent to... (by keskiverto)
by ttj
Need help: char array to string... string becomes garbage
 
Hi. I'm trying to "tokenize" a string using std::string functions, but I stored the text in a char array. When I try to convert it to a string, the string has t...
[3 replies] Last: Thanks Disch! Using the ANSI versions solved the problem; no complaint... (by ttj)
by BillH
which graphics library is best
 
I am fairly proficient with c++ and am now attempting to learn graphics programming. I would be interested to know which you feel is best for a real newbie to t...
[3 replies] Last: Thanks to you both for the advice. It looks like trying SFML 2.0 then (by BillH)
Help please!!!! (1,2)
 
In this code: // Ex8_05.cpp // Overloaded assignment operator working well #include <iostream> #include <cstring> using std::cout; using std::endl; c...
[24 replies] Last: Also based on this I can conclude that my author was wrong? right? (by Anmol444)
how do i replace the 2nd occurrence of a letter with x?
 
Hi guys, supposed i have a word hammer. how am i suppose to search for the 2nd occurrence of the letter and then replace it with x? example hammer will become...
[6 replies] Last: thank you vlad! You are a life saver! (by CLearner88)
C++ Using QT Creator
 
Hello I seem to keep getting random error messages when trying to compile and run my program. mainwindow.obj:-1: error: LNK2019: unresolved external symbol ...
[13 replies] Last: im still getting the error (by faieq92)
by azuew
azuew
 
Hi everyone. We have a project which is given by our lecturer and we don't move on this project. Firstly our game : www.miniclip.com/games/fat-slice/tr/ Our pr...
[no replies]
how do i take into account the white spaces in a string?
 
Hi people, as i am doing an encryption program on a playfair cipher. I am now stuck on a problem on decryption. If my string is helloworld (without a space),...
[4 replies] Last: sorry about that, the code is way too lengthy to be posted here. I wil... (by CLearner88)
Can't run this project! Help Solve it pls
 
Please help me solve this problem. I think the problem is not declaring it or having it as a parameter. //Main #include <iostream> using namespace std;...
[12 replies] Last: Can anyone help me with this? just solve my problem at //Main and //Re... (by training91st)
rand()%10 generating the same number
 
hi i assign rand()%50 to operands ; operands = rand()%50; operands = rand()%50; i use it for one problem but down the road i re assgn both t...
[4 replies] Last: @ Stewbond: you probably mean C++11's std::iota() , which does not ye... (by Catfish4)
C++11 Scoped Enums
 
Hi Guys, Can you please point out what is wrong with the code below? I keep getting this error on Eclipse June (GCC4.6.2 with -std=c++0x): cannot bind ‘st...
[3 replies] Last: enum class do two things. 1. It forces you do access the enumerators b... (by Peter87)
by oneaz
while statement
 
I'm confused with this one particular while statement. Can someone explain when will the loop be terminated and if possible, some example? found = false; whil...
[4 replies] Last: Oh ok, I get it now. Thanks for the help! (by oneaz)
char question and another problem
 
hello everyone, i have a question about chars and ill post the code also i have another question. #include <iostream> #include <string> #include <ctime> ...
[5 replies] Last: No problem everyone one of us has been in the same position as you. Ju... (by closed account 3qX21hU5)
by LB
Delegating ctors & reference vs rvalue reference
 
#include <iostream> struct Test { Test(std::istream &s) { int x; s >> x; std::cout << x << std::endl; } Tes...
[2 replies] Last: Oh, hah. For some reason I thought that was infinite recursion. Thanks... (by LB)
April 2013 Pages: 1... 1415161718... 53
  Archived months: [mar2013] [may2013]

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