Beginners - November 2010 (Page 36)

Error in my function?
 
Hey guys I'm trying to write a code for a connect4 program, and it seems that one of my functions don't work when I debug it. bool DisplayBoard(int** connect...
[5 replies] Last: yep, that's wrong. myConnectNBoard = new int ; This gives you... (by Disch)
Constructors and Destructors
 
An exercise that Stroustrup wants the reader to do is understand the output of the following program. #include "../../std_lib_facilities.h" struct X { ...
[2 replies] Last: @Drol, Thank you for explaining how to copy and paste from the cons... (by nathan10)
Read from file into array
 
I'm trying to open a file, read some data out of it into an array, and then display those values to the screen and then hopefully I can edit them, manipulate th...
[4 replies] Last: Well a vector, the way I used it is basicly the same as an array. The ... (by DrolArumil)
d) Use a for loop and the fill() manipulator
 
Use a for loop and the fill() manipulator to print the following: 1*2**3***4****5*****6******7*******8********9*********10 and so on, up to 100. I am tryi...
[12 replies] Last: I think the question is kind of ambiguous because it's so hard to coun... (by HooklessFastener)
by TahaB
Parsing output error
 
Hi i didn't know if i should post it here or in the linux section but anyway here it goes. I have an application where monitoring other application that im runn...
[6 replies] Last: Thanks but i sloved it in a slightly different way. I sloved it by the... (by TahaB)
by Krahl
Deallocating Array
 
In the following code I try to deallocate the memory for the Array and it only sets the first integer in the array to 0 and leaves the rest as it is. Is this su...
[5 replies] Last: So is ipArray called a dangling pointer or something after I delete it... (by Krahl)
Problems erasing from seq. container
 
Hello, I usually wouldn't ask in such an straight-forward way as I'm about to do, but I've throughly reviewed my code, and with my current knowledge I can't ...
[5 replies] Last: Happy to help. (by Disch)
wrong answer in division
 
i have a code that is running fine except that when it reads in from the third line of the input file the answer it prints is wrong. its supposed to give an an...
[5 replies] Last: Honestly, your variables are so cryptically named I can't bring myself... (by filipe)
Problems with infinite loop in operator= function
 
My code is below, the problem appears to be in line 98 where I have "head = c.head" which forms a loop. I don't want it to call Set(Set) again, I just want to ...
[no replies]
hello i have a problem with structures
 
hello please help me. im trying to make this code more dynmic i mean that the array is not constant, i want that the user can input lets say cout << "how m...
[1 reply] : In C++, array sizes can only be dynamic if the array is dynamically al... (by filipe)
by Faff
strange unsigned char's- questions
 
Hello :) Was looking at the 255 unsigned char's in vc++ using the code below. got a few questions 'bout some chars (... is to see the spaces etc): num...
[6 replies] Last: Because the Windows console interprets them as weird characters. On ... (by Bazzy)
vector <vector<short> throughs bad allocation
 
Hi guys. I have a strange problem. I have a class (Foo) which have a variable which is defined like this: vector <vector <short> > toTalk; When I t...
[3 replies] Last: vectors try to allocate contiguous memory. You might not have enough ... (by firedraco)
by heidiK
using linux commands in C++
 
Hello Everyone. I wanted to know if there is any way I can use linux commands in C++. I want to store the output of a program in a file which is otherwise di...
[9 replies] Last: Bazzy! I did not understand "Anywhere that allows you to keep the file... (by heidiK)
Bubble Sort, how can I validate the numbers?
 
So far, I have written a program that will allow me to enter the number of numbers I want in to the array, and read in the numbers. It then will use bubble sort...
[4 replies] Last: I got the program running, but I still can't grasp how to verify what ... (by jetter2)
Illegal Operation meaning.....
 
#include"iostream.h" #include"conio.h" const int ch = 5; void main() { clrscr(); int *p ; for(int j=0 ;j<ch; ++j) *p =j; for(j=0 ;...
[4 replies] Last: #5: Why is 'p' an array of pointers instead of an array of ints? Wh... (by Disch)
static variables in two different files
 
Hi, all, I have a question about static variables: I accidently defined two static variables of the same name in two different files: //file1.h static ...
[7 replies] Last: as i said, I accidently defined these two variables with the same nam... (by Disch)
Some obscure questions
 
Hello everyone, First and foremost thank you for letting me join this community it has been a wealth of knowledge so far. However I don't know whether I am n...
[1 reply] : Hello! We (and by "We", I mean Duoas) actually wrote an article abo... (by Albatross)
Suggestions for an easy to use middleware...
 
I have an assignment that is intentionally vague: utilize a free middleware program and demonstrate how to invoke it. What I hand in will be my implementation ...
[2 replies] Last: Oh, yeah. That is probably important: Windows 7. Thanks (by micpayne)
simple string size
 
#include <iostream> using namespace std; int main() { string str; cout<<"string"; cin >> str; cout << "The size of str is " << str.size...
[7 replies] Last: Post all your code. (by Duthomhas)
Probelm in assigning pointers
 
#include<iostream.h> #include<conio.h> void main() { clrscr(); int ch; cout<<"How many elements.....?????";cin>>ch; int *p ; for(int j=0 ;j<...
[1 reply] : int *p ; needs to be int *p = new int , this will allocate memory for ... (by Raggers)
November 2010 Pages: 1... 3435363738... 42
  Archived months: [oct2010] [dec2010]

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