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 ...
[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...
[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...
[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...
[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...
[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 ...
[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...
[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 ...
[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...
[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...
[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...
[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...
[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...
[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...
[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...
[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.
[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,...
[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...
[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 ...
[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...
[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.