5 Replies - 1766 Views - Last Post: 19 November 2012 - 04:32 PM Rate Topic: -----

#1 rosesexy018  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 19-November 12

error: internal heap limit reached; use /Zm to specify a higher limit

Posted 19 November 2012 - 01:12 PM

#include <iostream>
#include <string>
using namespace std;

int main ()
{
  string mystr;
  cout << "What's your name? ";
  getline (cin, mystr);
  cout << "Hello " << mystr << ".\n";
  return 0;
}


i want to have this output

What's your name? john long
Hello john long

but still unlucky to have that output

This post has been edited by jimblumberg: 19 November 2012 - 01:27 PM
Reason for edit:: Added missing Code Tags, Please learn to use them.


Is This A Good Question/Topic? 0
  • +

Replies To: error: internal heap limit reached; use /Zm to specify a higher limit

#2 jimblumberg  Icon User is offline

  • member icon


Reputation: 4074
  • View blog
  • Posts: 12,578
  • Joined: 25-December 09

Re: error: internal heap limit reached; use /Zm to specify a higher limit

Posted 19 November 2012 - 01:27 PM

What compiler are you using? Your code looks correct if you are using a modern C++ compiler.

Jim

This post has been edited by jimblumberg: 19 November 2012 - 01:28 PM

Was This Post Helpful? 0
  • +
  • -

#3 rosesexy018  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 19-November 12

Re: error: internal heap limit reached; use /Zm to specify a higher limit

Posted 19 November 2012 - 01:35 PM

i am using microsoft visual c++ 6.0 but before i am using this before on my other programs and still run
Was This Post Helpful? 0
  • +
  • -

#4 rosesexy018  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 19-November 12

Re: error: internal heap limit reached; use /Zm to specify a higher limit

Posted 19 November 2012 - 01:47 PM

hey jim still there?.. what do you think is my problem?. because i really need this for my assignmenr in school. i am new in programming
Was This Post Helpful? 0
  • +
  • -

#5 snoopy11  Icon User is online

  • Engineering ● Software
  • member icon

Reputation: 778
  • View blog
  • Posts: 2,310
  • Joined: 20-March 10

Re: error: internal heap limit reached; use /Zm to specify a higher limit

Posted 19 November 2012 - 02:18 PM

Hi,

The /Zm is a compiler flag that should not really be set...

It should be left to the compiler to ascertain how much memory it should use

However If you are getting a C1076 immediately after the build starts, the value specified for /Zm is probably too high for your program. Reduce the /Zm value. Or don't specify /Zm in the command line.

Snoopy.
Was This Post Helpful? 0
  • +
  • -

#6 jimblumberg  Icon User is offline

  • member icon


Reputation: 4074
  • View blog
  • Posts: 12,578
  • Joined: 25-December 09

Re: error: internal heap limit reached; use /Zm to specify a higher limit

Posted 19 November 2012 - 04:32 PM

Quote

hey jim still there?.. what do you think is my problem?. because i really need this for my assignmenr in school. i am new in programming

I suspect that this is because you are using such an old compiler. VC-6 is really too old to be trying to create modern C++ programs. I suggest you download a much later version, at least VC-2008 and give that a try.

Jim
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1