General C++ Programming - April 2012 (Page 32)

How to print on the console on a single line
 
Instead of it always printing on a new line, I want to overwrite the old one. so that it doens't scroll and I can make a good console gui. that way i can outpu...
[2 replies] Last: If you just want to overwrite the current line, or the last few chars,... (by andywestken)
c++ Object Serialization and transfer over Socket
 
Hi all! I need Serialization of basic class object to send it as binary over Socket. I managed to achieve this but partially. It works fine and at some po...
[1 reply] : comment and symbol are arrays. You wrote them correctly but you're not... (by LB)
Undefined Reference to (....) C++ HELP!!!
 
#include <windows.h> #include <winsock.h> #include <stdio.h> #include <string.h> #include <conio.h> #include <process.h> #include <mmsystem.h> #define BU...
[6 replies] Last: More like, "please remove the code, it doesn't help in answering the q... (by Athar)
by shwick
C++ boost prim's algorithm with custom weights?
 
I feel like I explain the problem well with my question on stackoverflow but it's not getting much response. http://stackoverflow.com/questions/10098437/c-bo...
[1 reply] : I see you made a typedef for something to E. The error relates to a ty... (by LB)
Reading in a char from a string
 
Here's the problem. In getWord(string&); I'm trying to read in a character, determine if its a nonblank or blank character and from then beginning of the string...
[1 reply] : There is no function named getLine that takes a reference to a string.... (by LB)
Destructors and how to use them?
 
So I've made some pointers using the new keyword and I know that every time I use the new keyword I must use the delete keyword to deallocate that memory. My ...
[11 replies] Last: aka RAII (by closed account S6k9GNh0)
Linked Lists, Or Dynamic Arrays?
 
What's your preference? I find that I have a hard time grasping the concept of pointers, yet Linked lists seems to be a ton easier. No resizing, no fuss. Simple...
[2 replies] Last: If you are talking about their implementation, dynamic arrays are a li... (by bbgst)
by htown
for loop variable
 
Is there a way to save each byte to a different variable in a for loop? for (int i = 24; i >= 0; i=i-8) { temp = ((memory >> i)& 0xFF); ...
[1 reply] : Maybe use an array. (by Galik)
Pionters
 
Hey everyone ! I was trying to make a program that sorts various strings. I succeeded but when i tried with pointers I failed. See please let me know how do ma...
[12 replies] Last: That is why i got confused, because you missed the "new" operator. And... (by S G H)
by kjoshi
problems with making the game pong in C++
 
Hi guys I'm really new to the forum and fairly new to c++, but have been really struggling with making a game pong. At my university we use a thing called Gwin,...
[no replies]
sorting numbers
 
I cannot seem to get it sorting properly, if you run this you'll see the issue. It skips numbers. How do I check to see the next highest number? here is the e...
[no replies]
Odds and Evens
 
I am trying to figure out a way to ask for two numbers (num1 and num2) and then output all the even numbers then all of the odd numbers. I know that the evens a...
[9 replies] Last: Great advice Duoas. C++ loops http://bit.ly/HxMdKd (by clanmjc)
Configuring boost 1_49_0 on CodeBlocks under linux
 
Hi, I have tried for hours but I cannot get Codeblocks to link with my boost libraries (/usr/include/boost_1_49_0/boost) the reason being that I am a complete n...
[no replies]
C++ array find the average mark, highest mark, lowest mark, number of students passing,?
 
i need help in adding the c++ code for the average mark, highest mark, lowest mark, number of students passing, using array for this code. #include<iostre...
[no replies]
by mokka
priave pointer member does not get assigned - lost value
 
Hi, My problem is that the value of mpCurrent gets lost after the program leaves the function. How shall I do the assignment? Thanks! private: Motors_t * m...
[2 replies] Last: Sorry copy mistake. The function sais: it is: Motors_t * mpCurrent;... (by mokka)
Many simple get/set members
 
My class has about 6 members which may go up to 12. They are quite simple types which don't really need any funny business and can be set directly. I've always ...
[19 replies] Last: Okay, I think ill make the Node a nested class within Curve, as managi... (by Carradin)
by Xleniz
BOOST Library: Getting file path from directory iterator
 
Hello, my name is Marcus, and I'm trying to get a game server to work in C++. The trouble is, it->leaf() is not there in most recent boost library. I'm trying t...
[1 reply] : See: http://www.boost.org/doc/libs/1_49_0/libs/filesystem/v3/doc/tuto... (by JLBorges)
by wr3
Cannot make locale work
 
Hi I try to use locale in my Xcode project and receive the message "terminate called after throwing an instance of 'std::runtime_error' what(): locale...
[7 replies] Last: > But how to make it part of my Xcode project? Don't really know - ne... (by JLBorges)
problem with iterators (1,2)
 
Hi all. I have to build a template class that works just like std::vector. I can't use any std container or external library. The main structure is done, I have...
[34 replies] Last: > Returning const T* from iterator::operator-> will prevent from c... (by JLBorges)
Test readability and writability of volatile memory
 
Hi, I am working with embedded software and our software need to satisfy a standard requirements "Volatile memory shsall be monitored by procedures that tes...
[1 reply] : char* pointerToMemoryStart = (char*)someMemoryAddress; for (int i = ... (by Moschops)
April 2012 Pages: 1... 3031323334... 49
  Archived months: [mar2012] [may2012]

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