General C++ Programming - April 2011 (Page 33)

Pointer Question
 
I have to make a program as a project for the college and they ask me to make it with pointers here's the code: #include <string> #include <iostream> #in...
[2 replies] Last: I can't see where "*Apunt_Global, *Aux, *D," were assigned to some obj... (by b2ee)
linked list (searching)
 
#include<iostream> #include<conio.h> using namespace std; typedef struct node { int data; // will store information node *next; // the reference t...
[1 reply] : In "Search" block, There is "temp1=temp1->data;". "temp1->data" is "i... (by b2ee)
socket question
 
I wonder if it is possible to guarantee than a client sockets sends a request to the server with a frequency of 30 Hz.
[2 replies] Last: If you use TCP, it can gurantee the ordering, but not gurantee the ser... (by b2ee)
Assigning values to Dynamically Allocated Array Problem
 
Hi, I'm having some issues assigning values to a dynamically allocated array immediately after a row of the array has been created. When printing the output ...
[4 replies] Last: http://www.cplusplus.com/forum/general/39813/#msg215623 Allocated with... (by ne555)
by Gldnbr
Using c++ to run a code
 
I need help on writing a C++ program that reads another "made up" program from a text file. For example: a=10 - 2; b = 20 - 5 * a / 4; print b a; a=b;...
[6 replies] Last: I would read by character, but you could just as easily read the file ... (by Mathhead200)
singleton() destructor
 
1 #include <iostream> 2 #include <new> 3 #include <cstdlib> 4 5 using namespace std; 6 7 8 class Singleton 9 { 10 protected: 11 ...
[10 replies] Last: It's realted with how to delete singleton implicitly or explicitly. Th... (by b2ee)
Hotel Program
 
n/a
[1 reply] : "perRoomOccupied" is declared as an 'int' when it should be a 'double'... (by Computergeek01)
by Dukaim
Print all data on terminal and ask for input
 
Hey, I was wondering if there was a way to do something like this on the terminal. Part Name: (input) Description: input_desc Availability: input_quant P...
[13 replies] Last: k now i get what you exactly wanna do....but this is a bad programming... (by jackel7777)
Order of operations
 
Hi C++ forum: Recently I ran into a very strange error. I have a class with overloaded operator = and with type signatures Variant& Variant::operator=(con...
[2 replies] Last: Do you know what the correct (C++ standard) way to interpret that sta... (by Disch)
class function returning another class
 
Hi all, I have 2 classes, vector and matrix defined in separate header files. In the vector class I have a function performing "outer-product" of two vectors...
[3 replies] Last: thanks guyz, yes it was actually a copy constructor problem! (by Shervin)
Playing Music?
 
Hi! I am not completely new to C++, but I am not super advanced either. So please keep this in mind when responding! Hey! I am trying to develop a program th...
[5 replies] Last: The BASS library. They even have an example program doing what you wan... (by ultifinitus)
Removing code at compile time with preprocessors
 
I am making a logging class which (very stripped down) has an interface something like this: class Log { public: Log(); ~Log(); void AddStrea...
[11 replies] Last: By "control locally", do you mean change the logging behaviour in the ... (by anonymous23323124)
by kwb13
Error please help :S
 
Hi im new to scripting and i tryed to do the famous "hello world !" but not even that simple c++ code i get to work every code i do i get some kinda error. btw ...
[11 replies] Last: Are you using windows? I believe System( "pause" ) is a windows ca... (by king214)
A vector inside a struct, inside a vector of structs. Plus pointers && ifstreams, OH MY!
 
Hello. I'm working on a simple real-time animation system. I am using some stuff I haven't touched in a long time and am trying to refresh myself and get some "...
[3 replies] Last: Hi, I kinda put this project to the side and it's been about a month a... (by NeedMoDro)
Xcode to visual studio discrepencies
 
Hi, I have written a code for a class which i have defined within a header file which is part of a namespace 'myns1',the memeber functions of the class are ...
[1 reply] : Are you sure that myns1::operator << is defined in your header? If so... (by kooth)
Private Inheritance (1,2)
 
class List { void insert(type); void remove(node*); bool is_empty(); int size(); type peek(); } class Stack : private List { void p...
[30 replies] Last: To the OP: I am working on the same problem right now... My datastru... (by invient)
by kwb13
Error please help :S
 
Hi im new to scripting and i tryed to do the famous "hello world !" but not even that simple c++ code i get to work every code i do i get some kinda error. [...
[2 replies] Last: No, you just double-posted. (by Athar)
Practical Application of the STL
 
I feel like the majority of C++ programmers (including me) don't know how to effectively use the STL. This topic might be a good place for us less-experienced t...
[4 replies] Last: This topic might be a good place for us less-experienced to find robu... (by closed account z05DSL3A)
by royy
rand fun in c++
 
hellow there i want to know if i can do rand function for char pointer? i want to do a fun that get some string and his capacity and return a randomal char fo...
[2 replies] Last: hey athar thanks a lot! (by royy)
Vector - use [] or .at() to initialise
 
I have a vector of bytes. I want to initialise this vecotor and don't know to use the operator or the .at() function. The documentation states that the only...
[6 replies] Last: The standard says that at() has bounds checking but the subscript op... (by closed account z05DSL3A)
April 2011 Pages: 1... 3132333435... 37
  Archived months: [mar2011] [may2011]

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