Beginners - June 2013 (Page 47)

arrays
 
how to make a variable that take subset from another variable which is an array ?
[3 replies] Last: int a = {1, 2}; int b = a ; ; (by pogrady)
by eyali
re-allocate array with in function
 
Hi All, I use visual studio 2010 for my c++ programming. I want to change/re allocate given array as argument to a function. I have the following functio...
[5 replies] Last: > how array is not pointer?? Arrays are not pointers. An array can be... (by JLBorges)
by jvk971
Problems with reading and wirting files!
 
Hi. Im learning about how to read and write to files. Im basically just copying what this guy does: http://thenewboston.org/watch.php?cat=16&number=67. I alrea...
[2 replies] Last: hehe:) thanks (by jvk971)
Need Help, Bubblesort in pointer
 
I have assignment to complete the following coding. My lecturer only give the number of rows and the variables used. I was asked to fill out the program itself,...
[3 replies] Last: That does give the impression that the main() should allocate memory d... (by keskiverto)
Custom shared_ptr
 
I'm trying to write my own version of shared_ptr and I just don't get what this error is about. Shared_ptr header. #ifndef SHARED_PTR_H_INCLUDED #define SHAR...
[10 replies] Last: Okay I'll add them in. The assignment operator is already redefined to... (by Olysold)
Howto public struct
 
Hello, I am trying to get public struct to whole project which data should be accessed from everywhere like is possible in C, but have problems to do that. I h...
[16 replies] Last: Finally catch what vlad was mean: common.h #ifndef COMMON_H_ #defi... (by beginplus2)
static variables
 
void func1(int i){ static int staticInt = i; cout << staticInt << endl; } int main(){ func1(1); func1(2); } the output is 1 1 but class Student...
[3 replies] Last: please use code tags: http://v2.cplusplus.com/articles/jEywvCM9/ ... (by Rechard3)
Just a function declaration
 
Just wanna ask what kind of the coding should implement in this function /* * File: Bitmap.h * Author: nabg * * Created on 26 February 2009, 1:...
[1 reply] : i'm sorry, i think your question is really unclear, is that only me, o... (by Rechard3)
Specifying template function to take containers.
 
Just came across this and am not very sure how it works, some help clarifying things would be great. template <typename T> typename T::value_type print(const...
[8 replies] Last: Awesome. Thank you JLBorges for helping me out again. (by Olysold)
Compiler issues
 
When I build a simple console application using codeBlocks and compile it I get this issue: -------------- Build: Debug in test (compiler: GNU GCC Compiler)-...
[1 reply] : try saving the entire project to one location like D drive then run it... (by sakonpure6)
How to read a list of data from a text file?
 
So right now Im trying to read data in from a text file. I got a text file that basically looks like this: John 15 5 1 Frank 23 8 1 Zach 17 1 4 John woul...
[4 replies] Last: You might also want to invest into structures. #include <iostream> ... (by giblit)
TicTacToe - 2D Array - Linear Search (1,2)
 
Hello, I'm having a little problem with completing this little TicTacToe program using a 2D array, it may seem a little messy because of my debugging, like cout...
[31 replies] Last: Cool man, I was able to use this in my connect 4 game as well. Really ... (by Fourc00h)
Reading files
 
Hi Can you use the cin function on a string variable? I am trying to read input from a file line by line. I want to be able to output the correct lines to...
[7 replies] Last: That's right. A stringsteam behaves in many ways just like a disk file... (by Chervil)
Help with some maths
 
Im pretty new to c++ programming and my maths is really rusty. What I'm trying to do is the following: I'm trying to write a simple c++ program that outputs ...
[3 replies] Last: The last if will never call, because you're using direct comparison wi... (by Ispil)
char array task...where am i going wrong?
 
Write your question here. : hello everybody...just finished this exercise...but for some reason something is not working... i should write a program to eliminat...
[1 reply] : cin does not keep track of spaces. Use getline instead. Also, use stri... (by Ispil)
Unexpected destructor call
 
I am trying to get a handle on working with classes and wrote a simple class that is used to store and display a string. I wrote an operator function to overloa...
[2 replies] Last: Thank you for your quick reply. You are right, if I declare the constr... (by R10111001)
std::cin and std::cout isn't working
 
Hello all the std::cin and std::cout aren't working for me correctly :( #include <iostream> #include "stdafx.h" int main(){ int count(0); double ...
[11 replies] Last: thanx, now working :) (by Anonimni)
Help me understanding logical operator well
 
I've just created a c++ program that computes the sum of the cubes from 5^3 to N^3 and after the following datas were printed, the user will be asked if he/she ...
[4 replies] Last: thanks for helping me (by jasonrobertz357)
Writing a function with pointers and arrays
 
I need to write a function named " void reverse(double* a, int size) " to reverse the number in an array. But instead of using indexes to transcribe from one ar...
[11 replies] Last: Awesome!! Thanks so much for showing me how to do that. :) Here's my ... (by daft science)
Data to Parallel Arrays
 
Hello everyone, first time poster, hoping someone can help me out. I am trying to read in data from a text file and store it into two parallel string arrays. ...
[no replies]
June 2013 Pages: 1... 4546474849
  Archived months: [may2013] [jul2013]

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