General C++ Programming - May 2016

by nawas
Ofstream and Ifstream conflicts
0 down vote favorite Why is it that I calling the ifstream and ofstream objects in the same scope causes the program below to misbehave by not reading ...
May 31, 2016 at 11:46pm
[1 reply] : you need to provide the input files that you use, ¿how do you expect ... (by ne555)
by ebto
Help with calendar program
Hello everyone I have a question regarding my code. The program is supposed to show 0-7 for the offset. This starts on a Sunday until Saturday. It is supposed t...
May 31, 2016 at 8:30pm
[1 reply] : Please don't double post. It wastes everybody's time. http://www.cplu... (by AbstractionAnon)
what auto concealed
What type does auto stand for here in lines 24 and 40? How does it appear in the code if it were written without auto? #include<iostream> int add(int x...
May 31, 2016 at 4:41pm
[5 replies] Last: Awesome, thx. (by technologist)
Alternative for GetValue
What's an alternative for GetValue, or how would I identify it? It says identifier not found. #include<iomanip> #include<iostream> #include<string> using na...
May 31, 2016 at 1:27pm
[4 replies] Last: Hi, A few things: ignoreNextChar could be of type bool , then li... (by TheIdeasMan)
Error with HEAP corruption
I'm writing a simple shooting game to brush up on my c++, and I am running into an error I don't know how to fix, or even what is wrong. Here's the error: imgu...
May 31, 2016 at 10:24am
[3 replies] Last: On line 10, you an making an array of size enemyCount . gameObjArray... (by Moschops)
Question about STL (1,2)
Hi all, I want to get numbers from vector SrcVec, and store in a new vector DestVec, but if the remove the duplicated numbers. like SrvVec: 1,2,3,4,5,2,3 And ...
May 31, 2016 at 9:30am
[21 replies] Last: Hi JLBorges, Thanks a lot. Of course I want to modify the argument an... (by HuagJie)
Help.. Class and variables
Hey guys.. I have no clue how to fix this.. so this is a game for 2 players and a bot to guess a game between 1-25 and it's working perfectly as far as I can te...
May 31, 2016 at 9:30am
[1 reply] : because they just give values zero when out of class What does that m... (by coder777)
by Loke
Recognizing +, -, *, / from input (cin) ??
Hey everyone, my lecturer recently posed a very strange requirements for one of our codes. Basically its just a simple circle-drawing code which draws a circle ...
May 31, 2016 at 8:00am
[2 replies] Last: @Necip Wow really didn't expect such a thing to be possible, this jus... (by Loke)
How to start with game programming in C++?
I have made a lot of games for dos through qbasic and turbo C and now, I started coding for windows(I like to make games for dos because it utilizes my brain wi...
May 31, 2016 at 6:38am
[7 replies] Last: Hey Thomasb, Everyone has their own views on where and how to start g... (by DTM256)
Help with vector search
I do not know what to do from here i keep getting errors in visual studio Also i am ignoring the multiplicities part at the moment Write a predicate functio...
May 31, 2016 at 5:40am
[1 reply] : isNum is always "false" -> your code is entrappt in an eternal loop! ... (by closed account 48bpfSEw)
by SidV
Sructs and Classes
Write a program that stores information about students. There should be a Date structure that has values for a month, day and year. The Student class should hav...
May 31, 2016 at 4:05am
[13 replies] Last: Thank you! I am still quite new to this language so there are many thi... (by SidV)
Help with register program
Hello, I'm currently working on creating a register for the business I work for. Our registers crashed and I wanted to start a little project just for fun and p...
May 31, 2016 at 3:23am
[no replies]
Problem With Sort
G'Day All, Please excuse me if this turns out to be a duplicate question. After a day of trying to figure out why Sort did not work, I finally realized th...
May 30, 2016 at 11:12pm
[3 replies] Last: _strcmpi is a non-standard function and will only work on particular... (by Moschops)
Average Calculation
I have to write a program in which I sum and average all the data for the population of Florida, and Mississippi. I think I did everything right, except, I seem...
May 30, 2016 at 11:01pm
[4 replies] Last: I used getline, and it works perfectly, I dont need help on this anymo... (by ProgrammerXYZ)
Inserting a value into a vector at a designated position
I have a vector (of ints); and I want to insert a new int at a specified position, n. vector has an insert method, but requires an iterator to specify the po...
May 30, 2016 at 9:30pm
[5 replies] Last: Why did you look at the documentation for vector.begin() instead of ve... (by jlb)
by solo9
While and for loop
Can someone explain me While and for loop on skype? cause i am having hard time understanding it.
May 30, 2016 at 9:20pm
[7 replies] Last: PM your skype name. I can help you with this. (by Irhcsa)
Roman Numeral Calculator Program
I need to make a program that converts Roman numerals to its decimal numbers. I need to include a function that yields the numeric value of each of the letters,...
May 30, 2016 at 6:09pm
[no replies]
Help, please...
Ok I can't seem to get this to work and I am out of Ideas, can anyone please help me. //Program Header //Program Name: Employee Class //Programmer: Aaron Wil...
May 30, 2016 at 4:33pm
[3 replies] Last: Thank you all this information was really helpful I was really stuck a... (by Wilburness)
how use resource files? (1,2)
i undertsand that the MAINICON it's for exe icon: #ifndef _resource_rc #define _resource_rc MAINICON ICON "x-7.ico" #endif imagine that i need add ...
May 30, 2016 at 3:15pm
[23 replies] Last: seems that an ico file can have several ico images... so we must use R... (by Cambalinho)
whats the role of "#" in gcc
can someone explain whats the function of "#" in the gcc code ? int main(void) { system_init(); #if USE_EIC == true # if USE_EIC_NMI == false configure_e...
May 30, 2016 at 3:07pm
[1 reply] : See: http://en.cppreference.com/w/cpp/preprocessor (by JLBorges)
May 2016 Pages: 123... 17
  Archived months: [apr2016] [jun2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.