Results 1 to 11 of 11

Thread: Need immediate help on basic cpp

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    51
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Need immediate help on basic cpp

    Hi guys,

    I know this forum is dedicated to qt but I am in trouble with basic cpp concept.

    Actually the following code works fine on window with vs2003 but won't get compiled on linux and mac os.

    Qt Code:
    1. void functionname()
    2. {
    3. // few statements
    4.  
    5. for(int nIndex = 0; nIndex < 10; nIndex++)
    6. {
    7. // few statements
    8. }
    9.  
    10.  
    11. for(nIndex = 0; nIndex < 10; nIndex++)
    12. {
    13. // few statements
    14. }
    15.  
    16. // few statements
    17. }
    To copy to clipboard, switch view to plain text mode 

    I think it is incorrect because nIndex variables should not exist after for loop. Please let me know your opinions.

    Any body can help me or figure out the reason behind the problem.


    Thanks in Advance.

    Sandip
    Last edited by jpn; 25th August 2008 at 08:58. Reason: missing [code] tags

Similar Threads

  1. very simple and basic FAM/Gamin wrapper for qt
    By momesana in forum Qt-based Software
    Replies: 0
    Last Post: 8th April 2008, 12:46
  2. Basic Qt4 tutorial needed
    By pthomas in forum Qt Programming
    Replies: 26
    Last Post: 16th October 2006, 15:11
  3. Need Basic html Browser
    By awalesminfo in forum Newbie
    Replies: 6
    Last Post: 21st March 2006, 17:14
  4. Basic question on new and delete
    By jcr in forum General Programming
    Replies: 25
    Last Post: 14th February 2006, 15:09
  5. Qt/C++ basic Q-s
    By jamadagni in forum General Programming
    Replies: 9
    Last Post: 10th February 2006, 08:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.