Beginners - February 2015 (Page 48)

fstream
How does one create a text file without replacing the last one every time the program is compiled? Say for example you made a text document for a person to stor...
Feb 3, 2015 at 10:09pm
[4 replies] Last: Thank you very much! (by supersonic1122)
Cant find out whats wrong with this attack sequence
Write your question here.
Feb 3, 2015 at 10:05pm
[no replies]
I can't find out why this attack sequence for a game isn't working, any ideas??
#include <iostream> #include <string> #include <time.h> using namespace std; int main() { int A; int B; int C; int EHealth; int EAttack; int He...
Feb 3, 2015 at 10:02pm
[no replies]
_MSC_VER
Hello everyone, I'm a beginner in C++. Could you please help me understand what _MSC_VER is? what does these lines of code mean? (Even reading the comment do...
Feb 3, 2015 at 8:58pm
[1 reply] : There are some defines which compilers do to help determine which plat... (by MiiNiPaa)
by cksk
Else statement not functioning properly in while loop
Hello and thank you for your time. I am a beginner and I am totally stuck. On line 126, the program is supposed to end but instead gives the output of "You got ...
Feb 3, 2015 at 7:59pm
[6 replies] Last: Read on stream states and how formatted input work. For starters read ... (by MiiNiPaa)
by Matas
sort alphabetically
Hello. All I need is to sort letters alphabetically. Program scans a row of capital latin letters. I do not know, what is best to create: an array, a string or ...
Feb 3, 2015 at 7:43pm
[3 replies] Last: //Indexes start with 0, end iterator points to _after_ last character... (by MiiNiPaa)
Can someone tell me what is wrong with this code?
I keep getting an error message that says uninitialized local variable 'E' used and I'm not sure how to fix it. Any feedback you could give me would be greatly ...
Feb 3, 2015 at 7:24pm
[14 replies] Last: Thanks everyone! (by misslyss)
Find if an integer is the sum of 2 powers
Hello,im trying to make a program that when you give it a number x it will output how many ways there are possible to get x by the sum of 2 powers(only powers t...
Feb 3, 2015 at 7:19pm
[5 replies] Last: highestPossibleBase = sqrt(input) , 'cuz input = highestPossibleBase ... (by TheHardew)
by h4ever
How to share struct within functions; (warnings: expected 'struct <anonymous> **')
I don't understand why this happens. I can call the read_png_file and *data is there. But when I call next function so there is no data in there but it is type ...
Feb 3, 2015 at 6:40pm
[1 reply] : process_file takes a PNGData** but you are passing a PNGData*. (by naraku9333)
by juju1
Problem of compilation
Hello everybody I have got a problem when I try to compile a tool called netmate-0.9.5 which is written in C. Here is the following error, I get : ....
Feb 3, 2015 at 6:34pm
[6 replies] Last: what does it mean to align values ? http://en.wikipedia.org/wiki/Da... (by MiiNiPaa)
by sam89m
How to loop when entering multiple similar items?
I am only one week into programming and I'm trying to learn how to use a loop. I need to ask the user to enter in 5 different test scores, and instead of repea...
Feb 3, 2015 at 6:29pm
[1 reply] : #include <iostream> int main() { const int NSCORES = 5 ; do... (by JLBorges)
Need help with C++!!
Hey guys I am really needing some help with this program, I need to code a program that displays the following Price Units Amount ...
Feb 3, 2015 at 5:22pm
[1 reply] : Limit the scope of your variables for(int i=0; i<5; ++I) then line 1... (by ne555)
Address Book! HELP!! ASAP!!!
Can someone please help me? Im stuck at this and i dont know what to do.. :( Please edit the wrong ones.. or help me to change it.. Needed badly tomorrow.. Than...
Feb 3, 2015 at 4:56pm
[no replies]
vector init loop trouble
What I want is a 2 dimensional vector of pointers to elements in another vector. I'm probably missing something obvious as this is such a simple piece of code, ...
Feb 3, 2015 at 4:52pm
[3 replies] Last: Ah! thanks. (by closed account oGhfSL3A)
strcmpi: does not return right result
It seems that I am not able to use strcmpi function properly. bool res = strcmpi(FilterType, "TwoD"); std::cout<< "response is " << res << "\n"; ...
Feb 3, 2015 at 3:34pm
[4 replies] Last: > I would expect the value of "res" and "res2" to be identical strcmp ... (by ne555)
Realistic random numbers
I hate the fact that every time i need to get some random numbers in a program i'll have to use the 'C' library srand and rand functions because the so call...
Feb 3, 2015 at 3:19pm
[13 replies] Last: Ooh thanks now i get it now but i might have to check on some more det... (by closed account SECMoG1T)
C++ Adding Chi-Square equation
Sample Output How many numbers? 7 Input a number -- 12 Input a number -- 22 Input a number -- 34 Input a number -- 43 Input a number -- 45 Input a number...
Feb 3, 2015 at 2:23pm
[no replies]
I.Q test game help
Hello everyone! Recently, I tried in some experimentations based on an I.Q Test game. Let me know if there is something I need to improve since this is the firs...
Feb 3, 2015 at 1:52pm
[5 replies] Last: I might not understand something. It looks like the user selects a di... (by dhayden)
problem using isalpha()
I want to write a program which take three float input from user and break if user enters an alphabet.kindly help me.i m doing it somthing like this but it isn'...
Feb 3, 2015 at 1:49pm
[3 replies] Last: if a,b,c are declared floats then all you need to do is check there wa... (by Jaybob66)
C++ member initialisation of an array element
How to do member initialisation of an array element ? class A { public: A(const char*){} } class B { A a ; B(const char* name):a?? { ...
Feb 3, 2015 at 12:47pm
[1 reply] : class A { public: A() = default; A(const char*) {} }; class ... (by MiiNiPaa)
February 2015 Pages: 1... 4647484950... 52
  Archived months: [jan2015] [mar2015]

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