So it looks if the variable is set?
Type: Posts; User: Kitt3n
So it looks if the variable is set?
If an "if" is used in the following way what does it do?
if(variable_name)
{
// What to do.
}
To the next problem. My book tells me to debug the program a.out that I have written and saved. However I am not getting the same results executing the command as are given in the book. The second...
Thanks. I was getting worried I overlooked something and that I could trow the book in the trashcan.
I just started learning C from a book in Linux and it told me to use objdump to look at the code in assembly. However I run into the problem that the output objdump gives me is not the same as is in...
No suggestions?
Write a program to compute and print the quartiles (that is, the quarter of the numbers
with the largest values, the next highest quarter, and so on) of a set of integers .
This is giving me...
Write a program to count how many times each distinct word appears in its input .
Some trouble here as well. This is what I am trying:
#include<iostream>
#include<string>
#include<vector>
...
How do I exactly know when and where to use:
::size_type
@Elysia
Thanks. I understood what they meant but I had no idea how to say it correctly.
@hk_mp5kpdw
The example code you are using it a bit confusing for me. The function you are using...
Thanks for the explanation.
Not to be rude and interrupt the two of you but do you mean that using "endl" would make a separate call to the standard library therefor making it more slow then using \n?
C++ Accelerated Questions Chapter 2.
2-0 Compile and run the program presented in this chapter.
Done.
2-1 Change the framing program so that it writes its greeting with no separation from the...
To the both of you. Could you explain how it is done what you mentioned?
I know I am probably becoming a pain in the ass with all my stupid questions but yeah, trying to learn hey....
This could be a stupid question and already answered before but what exactly do you mean by flushing the stream?
Ok, I thought it might had something to do with the size of the executable file after building it if there where more header files included.
Ok, thanks.
It kind of confused me to see header files like math.h there knowing the only thing I was using was std::cin, std::endl, std::string and std::cout beside the system pause.
So as...
Is this better?
#include<iostream>
using std::cout;
using std::endl;
int main()
{
cout << "#include<iostream>" << endl << endl;
Thanks. Stupid of me not to have seen the link to the .exe in the output window.
However even if I can ignore it what does this exactly mean "Cannot find or open the PDB file", what is a PDB file?...
I managed to build the program using the following settings.
New project -> Windows32 console application
tab:
Application type: Console application.
Add common header files for: both options...
I do not want to skip any of your advise but if I would do as suggested in this post is there then still any need to include stdafx.h or can I just code along from my book and I will not encounter...
I thought it added 3 to 4 but did not store the result in a variable but that it would still do the calculation.
I got the question wrong then. I will rewrite it and post the corrected version in this topic later. I am currently trying to solve how to code a triangle using loops in the 3th chapter.
I just downloaded Visual C++ and I am trying it out now but I got a problem. I can not seem to find how to create a new console application. I keep getting errors when I try to build an application....
It is the program itself.