#include <iostream>
using namespace std;
int main()
{
int iVal1 = 32;
cout << &iVal1 << endl;
int* ptrVal2 = new int(128);
Type: Posts; User: rynoon
#include <iostream>
using namespace std;
int main()
{
int iVal1 = 32;
cout << &iVal1 << endl;
int* ptrVal2 = new int(128);
I'm going to echo laserlight's suggestion. There should only ever be one single instance of main. What it looks like you want to do here is have the program exit when it reaches the return statement...
I'm not sure I understand the question. Could you post an example?
Well, you're not outputting anything in your code. You're just assigning values to the variables in your employee object.
What does every line of your code have in common except for std::cin.get()?
So you want to get rid of OSX on your Mac if I'm understanding correctly?
Before your return statement.
Add std::cin.get() after your your last statement in main and it will wait for user input before it exits.
return 0;
Add that too. :)
Alright. You have to remember that a * is just a char. What do you do when you want to !-->"string"<--! more than one char together?
If you replace your printf function with the following, what happens?
printf("flangerDelay: %f samples: %f\n", flangerDelay, tmp);
For question one you need to ask for the number of lines before you enter a loop. Consider the example output below.
Enter the number of lines (press 0 to quit): 4
*
**
***
****
Could you post your code so far and explain your specific problems?
What exactly are you having trouble with? Defining the method, manipulating the file?
May I ask if this is homework?
As far as I know, Macs cannot safely write to an ntfs partition. So write permissions are most likely disabled. I could be wrong.
I'd just use a vector of vectors and avoid this entire headache.
Why don't you post your code so far and tell us what the specific problem you are having is? Here's a tutorial on file i/o that might help.
http://www.cprogramming.com/tutorial/lesson10.html
Take a look at what your loop does. Say you enter the following data.
loan = 3.33
rate = 3.1
payment = 0.33
(I like three's)
So on month twelve, loan will equal 0.093329. The next...
Excuse me. Apparently I can no longer read.
Disclaimer: The following advice is most likely useless.
Are you using guards in your headers?
#ifndef __HEADERNAME_HPP__
#define __HEADERNAME_HPP__
// Code
I see. Have you tried Caption.c_str()?
Seconded. If you absolutely have to then I believe you would use something like...
(void*)&strVal[0]
Your getWord function implementation takes one argument (an ifstream) and in your main you are passing it an ifstream and a string as the second parameter.
Could you describe the errors?
Absolutely.
http://www.cprogramming.com/tutorial/lesson10.html
It's best to avoid goto statements whenever possible. I'd try something like...
for(int u=0;u<N;u++)
{
//snip
bool bOut = false;