General C++ Programming - May 2014 (Page 13)

C++ - How to loop through files?
 
I have a program below that calculates the average, sum, etc of the numbers in a file named "mynumberlist1.txt". I want to create a loop whereby the program...
[1 reply] : for example: void statistics(std::string filename) { std::ifstre... (by MiiNiPaa)
Creating series of outputs using a array created by a variable?
 
Hey guys/gals, I'm somewhat new to C++, and I've got an assignment for school that i'm having some trouble with. I'm expected to get a starting minimum ...
[4 replies] Last: O.K., I figured my dilemma out by myself; I feel bad for my really ama... (by CheeseyDragon)
Help me with this POO please(ii)
 
I can't find the following errors, help me please: Error 3 error C2371: 'fraction::SetData' : redefinition; different basic types line 7 Error 2 error ...
[10 replies] Last: Thanks "cire" and "Chervil" really, I'm learning more in this web site... (by jonanderdiez)
Tic tac toe game
 
Hello there. I am working on Tic tac toe game programming. I just started learning C++. The game that I coded consists of 3 different file. First one main.cpp f...
[4 replies] Last: If you put your code in code tags it would be so much more helpful fo... (by Codermik)
by Ferii
Error after input display
 
The code is supposed to display the total and averages of the data as well, but cuts off due to an error in the code. Since this code is quite lengthy, I will ...
[6 replies] Last: Go ahead and delete or close this thread, I figured out my problem now... (by Ferii)
Need help with menus?
 
Hello all, I need to make the following menu and i honestly have no idea how to start it: http://gyazo.com/0d706475389afb35bacdfd3e0c9dd873 . Any help/advice ...
[3 replies] Last: @bdanielz thanks for the help! (by RyanR1211)
Loading file with multiple lines
 
I'm trying to load a file that look like this: IP:123.123.123.123 Port:12345 I can't figure out how to load multiple lines. I tried using \n, but I can't...
[1 reply] : Figured it out, but config doesn't look as nice as before. I looks lik... (by Bingocat4)
by wiswis
Homework help
 
Hey guys! This is my first post on this site. So I am taking this c++ intro class which I am really having trouble with. Ive heard that this forum can answer so...
[6 replies] Last: That looks like it should work. The only problem with doing it that wa... (by admkrk)
problem with string.find()
 
i wrote a code to check the number of distinct char in a string whether even or odd using string.find(), but it seems it's not working !!! #include <iostream>...
[1 reply] : Please explain "not working". I don't think that your code does exact... (by keskiverto)
Threadpool problem
 
Hi , i am trying to realize a thread pool with a shared queue. This is the code. #include "Filename_with_id.h" #pragma once class ThreadPool { ...
[5 replies] Last: Yes sure :) Thanks for the code..i will study it. (by Franconet)
end of line
 
This may sound dumb but I have the book call Jumping into C++ and I believe that the author is using the wrong syntax for the end of a line. I'm just learning ...
[5 replies] Last: Thank You all for the replies. (by papagym177)
HELP please
 
guys please i need someone to solve this exercise.... need to make this exercise until tomorrow otherwise i will get cut in programming... i can not do anything...
[10 replies] Last: ok..thank you (by chris12)
[cpp] Problem with load items and equip
 
Log: main.cpp: In function 'int main()': main.cpp:6:8: error: no matching function for call to 'CItem::CItem()' CItem Items; ^ main.cpp:6:8: note: c...
[2 replies] Last: Ok program not compile. :( error: Character.cpp: In member function ... (by Jerry95)
how to use backspace in password?
 
http://www.cplusplus.com/forum/general/3570/#msg15121 #include <iostream> #include <string> #include <conio.h> using namespace std; int main(){ stri...
[2 replies] Last: I replied to your post here on the same subject: http://www.cplusplu... (by Codermik)
Huge output file
 
Hi, I'm using Eclipse for C++, with mingw compiler, where g++ uses same strategy as VS2010, meaning it compiles the program, but should you run it at another co...
[no replies]
by ykse
Why can I call a SingeltonObjects non static member functions without ever calling its constructor?
 
CDoubleHashing.h class CDoubleHashing { public: static CDoubleHashing& getInstance(); virtual ~CDoubleHashing(); int hash(...); private: CDoubl...
[1 reply] : The reason is because it was never constructed. Notice, though, that y... (by TwilightSpectre)
red black tree-SFML
 
can someone make a red and black tree using SFML ....because i really need... i would appreciate it if someone could make it for me. i really dont know how to u...
[3 replies] Last: the kind of red and black tree is like this.. but not actually like th... (by gepsjay)
About double pointers..
 
Hi all! I'm typing in my dev since a month ago for taking much more confidence with the c++ (already met at high school). I've formulated a basic script for...
[4 replies] Last: thank you very much for spnt your time for me ;) I've correct the code... (by Mexonius)
What the heck is going on here??
 
while (getline(inStream, line)) { while (inStream >> Student.getId() >> Student.FNAME >> Student.MINIT >> Student.LNAME >> Student.GENDER >> Student.UNI...
[2 replies] Last: Probably because the overload you're looking for uses double&, not dou... (by Daleth)
Regular expressions
 
I was trying to write a regular expression for an email.id and this is what i came up with. (\w+)(\_|.)?(\w+)(@)(\w+)(\.)(\w+) Is this right?
[5 replies] Last: thank you. (by generic2709)
May 2014 Pages: 1... 1112131415... 31
  Archived months: [apr2014] [jun2014]

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