General C++ Programming - June 2012 (Page 5)

by ostar2
I need help with a do while loop (1,2)
 
I am trying to write a string to a text file in a loop . It compiles correctly without errors. However, it currently only writes one line any help would be grea...
[30 replies] Last: I am actually gong to have the compiler warn when code will never be ... (by TheIdeasMan)
char const *variable[] - Is it me or my compiler?
 
Hi Folks, I have the following dummy test code... maybe it's me that's the dummy, but hopefully not :) void James(char const *ptr); void James2(char...
[3 replies] Last: About why T** cannot be converted to T const**: http://www.parashift.c... (by Cubbi)
by djru
Loop acting crazy
 
I'm at the very end of this calculator program, everything is working perfectly. Besides the fact I cannot get this loop to end. I can't end it with while...
[3 replies] Last: You forgot to put a break statement at the end of the case 'q' so it w... (by Peter87)
by Laveer
Moving a form only within a specified window
 
Hello, I'm currently trying to make an extension to one of my programs which injects a .dll containing a form. I'd like to know if it's possible to have the for...
[2 replies] Last: what kind of window is it? normally a window should move according(=in... (by coder777)
Calling functions / Using andywestken's code to output text
 
Hi, There's a post in the Windows Programming forum about selecting fonts: http://www.cplusplus.com/forum/windows/62180/. The user andywestken's code allo...
[8 replies] Last: I am not aware of a way to customize MessageBox, aside from re-coding ... (by andywestken)
How high level to go?
 
I was making an encryption library, and i managed to make 3 stages of level, my first one just took char arrays and encrypted it, and the next took istreams and...
[2 replies] Last: Ok thanks for the reply, I'll try to add a callback (by Carradin)
SDL networking problem
 
For the last few days I have been practicing basic networking using SDL_net. I have managed to create a server and have users connect to it (the server is runn...
[2 replies] Last: Interesting, I have never heard of NAT before (my general internet kno... (by Hippogriff)
unable to pass argv[2] to a function
 
Hi, When I try to pass to a function the value of argv directly, I am unable to do so. Code snippets of what I am trying to do is as below: //The function ...
[8 replies] Last: The behavior was indeed due to compiler optimization! In fact I saw a ... (by DeepBlack)
how to display char arrays
 
How do you display char arrays that are two or more words? For example, I'm making this simple program where I have declared char country ; cout << "Ple...
[2 replies] Last: #include <iostream> #include <sstream> using namespace std; in... (by LimeOats)
Cannot find my void?
 
ok so i made a windows form application and there are 2 seperate .cpp files... Windows form.cpp // Windows form.cpp : main project file. #include "stdaf...
[6 replies] Last: You need to include search.h in form1.h, but dont need to include form... (by naraku9333)
Non Member Operator Overloading c++
 
In this assignment I am supposed to un-comment what my professor has given us and test each function by implementing it in Money.cpp. For the first overloaded +...
[1 reply] : To shorten this (that's a lot of code!) Declaration: Money operator+(... (by Stewbond)
by gws923
Compiler insists a class member doesn't exist
 
Hello all, I'm getting the following compiler error: EntityManager.cpp|54|error: 'class Entity' has no member named 'deleteFlag' However, the Entity clas...
[4 replies] Last: Right, that was exactly the problem. Re:static, I think you're probab... (by gws923)
C vs C++ (1,2)
 
http://www.daniweb.com/community-center/geeks-lounge/threads/383422/what-would-win-in-a-fight-c-or-c [quote=cwarn23]I vote for C because C++ was written in C t...
[31 replies] Last: You can't really ever say C++ is better than C, and vice versa. The la... (by spaggy)
by jorgen
How avoid blank line at end of file
 
Hello, I have a small program that I want to use to delete all lines in a file after a certain line. It works fine except it puts a newline (I assume an '\n'...
[1 reply] : How do you know there is a new line character at the end? Have you ope... (by Peter87)
Exception Handling Advantages
 
Hi What is the advantages of using exception handling mechanism instead of plain if statements? Is it possible to resume the program when an exception is thr...
[3 replies] Last: Throw and catch allow multiple datatypes to be returned by a function.... (by closed account 3TXyhbRD)
Simple compilation question
 
Hi guys, Sadly I've got no C++ installed and now I need a very simple program. I don't want to install it because it uses a huge amount of space and curren...
[9 replies] Last: I get you. I'll amend it when I get home and upload a new version wit... (by MrHutch)
problems with multipule files using a global.h
 
OS: Windows 7 IDE: VS 2010 So I have been searching google for a the last couple of days and can't quite get the answer I have been looking for, so here is ...
[12 replies] Last: doug4: Ashley is defined in main (it should have been, at least). He s... (by S G H)
(PS3)SPUs vs cores(quadcore PC)
 
quick question: on the PS3, are the Synergistic Processing Units (SPUs) IBM talk about, the same as cores in general CPUs today? Lets say I've got a quad cor...
[19 replies] Last: Don't people use networking on another thread, even though they could ... (by Zephilinox)
by ostar2
menu using goto function with variables
 
Hello, I am trying to make a menu for my program that goes to a label depending on the letter entered. Any help would be much appreciated. Here is my code: ...
[11 replies] Last: No, I did: int main() { e: then I put the rest of the code.... (by ostar2)
by Rii
Reading text file with multiple data structures
 
Hello there ^^ I was wondering how I could read a text file with multiple data structures(not sure if it's called that way) into a matrix(typedef std::map<st...
[6 replies] Last: Thank you so much! Perfect! Sorry for the confusion at first, I though... (by Rii)
June 2012 Pages: 1... 34567... 33
  Archived months: [may2012] [jul2012]

This is an archived page. To post a new message, go to the current page.