Like Tree2Likes

problem using concatenation of arrays[*new]

This is a discussion on problem using concatenation of arrays[*new] within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by rcgldr Has your class taught you anything about how to calculate CRC's yet? Originally Posted by jeedi ...

  1. #16
    Registered User
    Join Date
    Apr 2013
    Posts
    1,322
    Quote Originally Posted by rcgldr View Post
    Has your class taught you anything about how to calculate CRC's yet?
    Quote Originally Posted by jeedi khan View Post
    I have done it
    Could you post that code here? Isn't that what you are trying to accomplish?

  2. #17
    Registered User
    Join Date
    Jul 2013
    Posts
    158
    Quote Originally Posted by rcgldr View Post
    What compiler are you using? What operating system are you using?
    Visual C++ 2010 Express Edition on Win7 ultimate ed.OS

  3. #18
    Registered User
    Join Date
    Apr 2013
    Posts
    1,322
    Quote Originally Posted by jeedi khan View Post
    Visual C++ 2010 Express Edition on Win7 ultimate ed.OS
    I have a multi-boot system, I run Win XP (32 bit) most of the time, but I also have Win 7 Pro 64 bit. I don't have VC++ 2010 Express, but I have Visual Studio 2012 Express installed on Win 7 and was able to compile and run the example I posted before. I'm not sure what the issue is, but maybe you could switch to Visual Studio 2012 Express.
    Last edited by rcgldr; 08-24-2013 at 05:47 AM.

  4. #19
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,920
    Compiles for me on 2012 and 2013. Any reason you're using 2010 (except for the fact that 2012/2013 still looks horrible)?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #20
    Registered User
    Join Date
    Jul 2013
    Posts
    158
    Quote Originally Posted by Elysia View Post
    Compiles for me on 2012 and 2013. Any reason you're using 2010 (except for the fact that 2012/2013 still looks horrible)?
    No Reason but i am having 2010 available

  6. #21
    Registered User
    Join Date
    Jul 2013
    Posts
    158
    it didn't seem to me a compiler ISSUE as it worked sometimes also but this time is STUCK

  7. #22
    Registered User
    Join Date
    Mar 2010
    Posts
    535
    How strange. Definitely looks like missing includes.

    Could you go to Project properties --> C/C++ and make sure "Precompiled headers" is off. Delete stdafx.h and stdafx.c if they're there in your project. Then do project -> Clean, then try rebuilding again?

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    22,920
    It really shouldn't matter one bit if precompiled headers is on or not.
    Rebuilding might help, though.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #24
    Registered User
    Join Date
    Mar 2010
    Posts
    535
    I have vague memories of something like this happening to me once. I didn't have <<, but I did have trouble dereferencing a vector<string> iterator. I stared and stared and saw nothing wrong. Would have been msvc 2010 as well.

    Quote Originally Posted by Elysia View Post
    It really shouldn't matter one bit if precompiled headers is on or not.
    You're probably right - I don't have any reason to suspect it of causing trouble, but I saw stdafx.h in the first post and wanted to eliminate it -- better to be able to see what headers are getting included. Doesn't look like the later snippet even has it, and <string> certainly hasn't managed to climb above it.

  10. #25
    Registered User
    Join Date
    Jul 2013
    Posts
    158
    Quote Originally Posted by smokeyangel View Post
    How strange. Definitely looks like missing includes.

    Could you go to Project properties --> C/C++ and make sure "Precompiled headers" is off. Delete stdafx.h and stdafx.c if they're there in your project. Then do project -> Clean, then try rebuilding again?
    It's trivial to get fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?by not using stdafx.h...it's not the reason nor deselecting precompiled headers.
    Last edited by jeedi khan; 08-25-2013 at 04:04 AM.

  11. #26
    Registered User
    Join Date
    Apr 2013
    Posts
    1,322
    You could try deleting everything but your source files and then create the project again, make sure to choose "empty project" in the process.

  12. #27
    Registered User
    Join Date
    Jul 2013
    Posts
    158
    Quote Originally Posted by rcgldr View Post
    You could try deleting everything but your source files and then create the project again, make sure to choose "empty project" in the process.
    Yes i did....No improvement yet

  13. #28
    Registered User
    Join Date
    Jul 2013
    Posts
    158
    it works now ...thanks to ALL on this thread

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem in concatenation of arrays
    By jeedi khan in forum C++ Programming
    Replies: 68
    Last Post: 08-22-2013, 09:56 AM
  2. concatenation
    By valthyx in forum C Programming
    Replies: 5
    Last Post: 01-17-2010, 08:22 AM
  3. K&R problem !! String concatenation :(
    By karanmitra in forum C Programming
    Replies: 9
    Last Post: 08-18-2005, 06:20 AM
  4. printing arrays with concatenation
    By derek23 in forum C Programming
    Replies: 1
    Last Post: 07-17-2005, 04:02 AM
  5. Concatenation ?
    By koolguysj in forum C Programming
    Replies: 8
    Last Post: 04-15-2005, 05:26 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21