General C++ Programming (Page 9)

Best practices for checking valid input in OO design?
What is the best practices for checking valid input in a Object Oriented design? Consider the fol...
[2 replies] Last: It is a good idea to make constructor check invariants. If constructor... (by MiiNiPaa)
by anhnha
Pointer to x or y element of CPoint
Assuming that I have an array of points with type CPoint. CPointArray arrpt; //arrpt is an array o...
[3 replies] Last: What is the pointer to the second member (y) of the array? Pointer t... (by MiiNiPaa)
loop until correct added
If I type a char in int datatype input then the loop becomes infinite. I tried to handle it but can'...
[1 reply] : When you input characters, cin>>number tries to read it. However it ... (by MiiNiPaa)
by noaboa
Problems with getting string
Hi, im trying to save and load some text to a file you decide to get the name on. After that you nee...
[6 replies] Last: Thanks for the help (by noaboa)
by memouz
pass string to DLL
Hi there I need help with c++ string I am MQL4 programmer I know how to pass any value to dll...
[11 replies] Last: Thank you mr Gamer2015 I use windows 7 I tried that but that text I s... (by memouz)
by nicode
GNU libstdc++ custom std::codecvt linker error
I developed several custom converters and want to comment on the archived topic http://www.cplusplus...
[2 replies] Last: Many thanks for the comments. But your example code derives from the e... (by nicode)
Replacing letters in a string(A with Z; B with Y; C with X; D with W; etc)
Hi ! Im trying to create a program that will replace letters in a string(A with Z; B with Y; C wi...
[3 replies] Last: It seems like you are replaceing one letter at a time (all A to Z, the... (by MiiNiPaa)
How many constructors are in the person class above?
Consider the implementation of the following class class person { private: int age; int get...
[2 replies] Last: How many constructors are in the person class above? Yeah, Five but ... (by Gamer2015)
by st3pha
Cin inside a function inside a process looping
Hi, I'n trying to do a simulation, I need to enter (cin ) floats like a,b,c,d,e,f,g. and use them in...
[no replies]
Output of this code snippet?
What is the output of the following code? int x = 0; int i; for (i = 0; i < 4; i++) ; x++; ...
[2 replies] Last: Actually, as it stands, there will be no output. If you click on the l... (by andywestken)
time.inl and error C2664
I found this file in a game I'm working on: /*** *time.inl - inline definitions for time-related f...
[1 reply] : If anyone cares I figured out the answer to this problem. You can sol... (by bishoposiris)
Installing matpack C++ library
Hi, I am installing matpack c++ library from the source and getting some prob...
[no replies]
by jessi
Merge two Linked ordered linked list
Hi, I am trying to implement a mergelist function that combines the elements in list1 and list 2 in...
[1 reply] : What issues do you have? (by coder777)
Threads and memory
Hello all! I am developing a simple timer/clock program on Windows 7, Using SFML and Codeblocks w...
[no replies]
Help with CSV parsing
Hi, I'm pretty new to C++, and wanted to try and read a simple csv file. The format of the file is:...
[3 replies] Last: you're welcome! (by Gamer2015)
Atomic operations
Hi, I was reading my book "Professional C++ 3rd Edition" by Marc Gregoire on the Atomic operation...
[6 replies] Last: Thanks to everyone that replied to this thread. For future viewers, he... (by IceStorm)
by cotro
Calling a function only to call vector functions it is inefficient?
Hello, I have a certain class whose a member it is a vector. I made this vector member a private mem...
[7 replies] Last: it makes no sense to make a member private and then expose access to ... (by MiiNiPaa)
string error.
I want to read a text of more than one word and then replace the blank spaces with an underscore(_)...
[4 replies] Last: #include <iostream> #include <string> int main() { std::string s... (by JLBorges)
Is it possible to access a word from a string containing more than one word.??
[6 replies] Last: You can't with you current logic; as I just said, you need more logic!... (by andywestken)
string program
In this program i want to input several city names and display only those beginning with "B" or "C"....
[2 replies] Last: thanku .it worked :) (by samarth123)
Pages: 1... 7891011... 29
  Archived months: [may2015]

Cannot post in this page. To post a new message, go to the first page.