Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Frustration...

encryption

  • Please log in to reply
14 replies to this topic

#13 espdev-darkness

espdev-darkness

    CC Regular

  • Just Joined
  • PipPipPip
  • 41 posts

Posted 03 December 2010 - 06:41 AM

So just use the cstdio library instead of iostream?
  • 0

#14 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 03 December 2010 - 06:16 PM

Thanks for the correction, but what do you mean not a standard method to break out of a loop? It exits the program, not the loop.

It breaks the flow of the application, it would make adding closing statements impossible (such as writing to a file statistics or anything)

So just use the cstdio library instead of iostream?

Yes, I would hate to defer you from learning C++'s point of being but many of its classes require a lot from the compiler and yourself, you can write it using C functions in half the code/time. You just need to better understand low level things, such as how memory is allocated and how to properly assign it and protect from overrunning it.

Although truthfully using printf instead of cout and fgets instead of cin is not really a huge difference. Just remember scanf is like cin (it will ignore whitespace) and fgets is like getline() as it will accept anything up until the newline if you like it to.

You can also use "cin.getline(string, 255)" on a "char string[255]" if you prefer to keep the syntax, and you can convert any std::string's to char arrays through char cstring[255] = string.c_str(); or something similar
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#15 espdev-darkness

espdev-darkness

    CC Regular

  • Just Joined
  • PipPipPip
  • 41 posts

Posted 03 December 2010 - 08:27 PM

Thanks for all the information, Im just getting to the end of my book where Memory Allocation and Polymorhpism is being explained. However I find it quite repetetive in my book and not well worded so I will probably go over it briefly then research it more on the internet.
  • 0





Also tagged with one or more of these keywords: encryption

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download