Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Tuesday, April 17, 2007

Linux Programming Environment Settings in Windows XP (with VMware)

  • GNU Emacs color settings & syntax highlighting for 256-color terminals (with PuTTy and screen):
    • See EmacsWiki: PuTTy for PuTTy settings.
      • Just change "xterm-256color" to "putty-256color" in "terminal-type-string".
    • Install "xterm-256color.el" under "lisp/term" directory.
      • Create "putty-256color.el" having the following line in the same directory:
        • (load "term/xterm-256color" nil t)
    • Install (from source) 256-color-enabled "screen".
    • Add "term putty-256color" in "$HOME/.screenrc".
  • Static IP address with NAT for Ubuntu server in VMware:
    • Update "interface" file under "/etc/networking" as follows:
      • From:

        iface eth0 inet dhcp


      • To:

        iface eth0 inet static
        address xxx.yyy.zzz.abc
        gateway xxx.yyy.zzz.2
        netmask 255.255.255.0
        network xxx.yyy.zzz.0
        broadcast xxx.yyy.zzz.255

Friday, December 31, 2004

On debugging STL with VS.NET 2003 debugger

From: "Oleg Starodumov"
Subject: Re: debugging with STL
Newsgroups: microsoft.public.vc.debugger

> how do I use VS C++ .NET 2003 debugger to view the data in a STL
> container, such as vector and list?
> If I just type the name of a vector into the Watch window, all I see is some
> beginning and ending memory address.
>

There is no direct support for STL containers in Watch window.
Instead you have to work with the members of the corresponding
container types.

For a vector, you can start with these examples:

"v._Myfirst" -> the first element
"v._Myfirst, 10" -> 10 elements
"v._Myfirst[1]" -> the element at index 1
"v.size()" -> number of elements

For a list:

"l._Mysize" -> number of elements
"l._Myhead->_Next->_Myval" -> the first element
"l._Myhead->_Next->_Next->_Myval" -> the second element
"l._Myhead->_Next->_Next->_Next->_Myval" -> the third element, etc.

Regards,
Oleg