General C++ Programming - November 2008 (Page 6)

by dpmf
sleep function
 
Hi there, I made a small C++ program that consists in checking if an hour and a minute of a day as become to copy a file to another location. The program was w...
[4 replies] Last: How long are you sleeping? and your not doing something like whi... (by Zaita)
by vjean
pointers
 
This code compiles fine, but I can't get it to run. Can someone tell me what I'm missing? When it complies and runs, it should look like this here: "Enter a...
[11 replies] Last: Thanks...Nah, the user won't enter that many numers. Let me play with ... (by vjean)
Matrix multiplication assistance
 
Here is my assignment: Define a function that multiplies 2 matrices. The function should have 3 parameters for arrays. The first 2 parameters are the matrice...
[1 reply] : http://www.cplusplus.com/forum/articles/1295/ (by Zaita)
by gospes
enum subsets
 
hi, I was wondering if it was possible to use multiple enums that are subsets of eachother. This next example is syntactically incorrect, but it's what I do wa...
[3 replies] Last: Yup, sometimes I wish I could inherit enums :) enum ErrorCode { ... (by jsmith)
a 3 page paper on doubly linked lists + iterators
 
Hi all, I only have 2 days left to do this and I really started to panic! I need your help badly. I need to write a paper on doubly linked lists in C++ and ...
[3 replies] Last: Lol - Love the bigger font idea. Uhm http://www.learncpp.com/ other th... (by Mythios)
Switching Between Two or More Fields
 
First, let me give you a sample C program to ask you what I want to do: #include <stdio.h> void main() { int rollNo = 0; char stdName ; char sect...
[3 replies] Last: Personally. I would put a GUI ontop of your console application. You'l... (by Zaita)
how two programs access the same address?
 
i created and run two programs with the same codes and at the same time this is the code: #include<conio.h> #define i 8 int main(void){ int arr ...
[9 replies] Last: seymore points out a class case of a buffer-overflow. While it may app... (by Zaita)
calculating the integral
 
this is one of few of my practice quizzes for my upcoming test, i am having way too much trouble writing the code for it out, help on writing this code out will...
[2 replies] Last: http://www.cplusplus.com/forum/articles/1295/ (by Zaita)
writting a C program
 
this is one of my practice quizzes for my upcoming test, i am having way too much trouble writing the code for it out, help on writing this code out will be app...
[2 replies] Last: http://www.cplusplus.com/forum/articles/1295/ (by Zaita)
dynamic knapsack
 
i just need a code that solves a dynamic knapsack algorithm using backtracking and recursive functions... plz post ur code. thx
[2 replies] Last: http://www.cplusplus.com/forum/articles/1295/ (by Zaita)
What more to do if .....
 
I want to get the following output; 5 25 6 36 7 49 8 64 9 81 10 100 and my code is as under #include<...
[5 replies] Last: If you ask something here and I know how to solve your problem, I will... (by Bazzy)
HEAP CORRUPTION DETECTED
 
#include "stdio.h" #include "conio.h" #include "string" #include "iostream" using namespace std; class MySimpleString { private: int m_iSoLuong; c...
[1 reply] : You were just adding on the new string to the end of the existing str... (by guestgulkan)
Detect stack usage before receiving SIGSEGV
 
Hello everyone, I just wrote a couple of tests to see what happens if a programs grows it's stack until the limit. In one I allocated a very large array, and...
[2 replies] Last: Thank you! (by ElMarcel)
random number guessing game
 
I need help with an assignment for a class.Im supposed to write a program where the program picks a number between 1 and 1000 and you have to guess the number.A...
[2 replies] Last: Try this: #include<iostream> #include<cstdlib> #include<ctime>... (by kdenisk)
Stack characters
 
Is there a way to stack multiple characters? Example: // stack::top #include <iostream> #include <stack> using namespace std; int main () { stack<...
[1 reply] : Use stack<string> instead. (by jsmith)
connect4 project
 
We just got our new project for CS121, and I have a couple of questions. Our assignment is to write a connect4 game. I've figured out the logic, which isn't tha...
[16 replies] Last: string has the following constructor (from memory): string( size_t ... (by jsmith)
by Basile
STL containers (ie vectors) & Boehm GC
 
Hello All On my Linux/Debian/Sid/AMD64 I would like to use some STL containers (like vectors or maps) allocated using the conservative Boehm garbage collecto...
[8 replies] Last: I just would want something like class MyObject; // MyObject ... (by Basile)
by manit
list, whose last element points on the first...
 
Hello! How can I make a lists or a slist, whose last element points on the first; for example: slist<int> L; L.push_front(0); L.push_front(1); // L is "...
[4 replies] Last: jsmith i take it you know a fair bit about programming itself. All the... (by Mythios)
Making a tempalte class internal of another class
 
I am a newbie in C++. My template classes work fine (at least it seems like so). Now I'd like to make class Iterator an internal class of List. Could you h...
[2 replies] Last: Please write a concrete question/problem. You can include template cla... (by exception)
by madhuk
Problem while creating 2D array at run time.
 
Hi all, I have a macros and a method like below for creating 2D array from local variable, #define CREATE_2D_ARRAY(dest, source, dim1, dim2)\ {\ dest = ...
[1 reply] : Both macros use _i as a variable name, so when you "invoke" CREATE_1D_... (by jsmith)
November 2008 Pages: 1... 45678... 11
  Archived months: [oct2008] [dec2008]

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