Beginners - January 2014 (Page 30)

Chess
 
Hi, I'm taking a grade 11 course in programming and this chess game is my summative. Please note that there are a few things yet to be implemented (en passent a...
[7 replies] Last: [quote=Yellow0ne]I know I can shorten it considerably, that is what I ... (by LB)
Pointer to a struct type
 
Hey guys , I was just wondering if I wanted to create a dynamic struct like here : #include<iostream> #include<iomanip> using namespace std; struct can...
[9 replies] Last: pointer->blah is a shortcut for (*pointer).blah , so you are always... (by LB)
by OUIJ
help with error msg
 
what does the "undefined reference to Rectangle::Rectangle()" mean. I am trying to practice creating a simple header file to learn the ins and outs. I watched...
[4 replies] Last: You're welcome, and good luck! (by kooth)
by anudes
calling by reference
 
// PassObjRef - change the contents of an object in // a function by using a reference #include <cstdio> #include <cstdlib> #include <iostream> using names...
[2 replies] Last: [quote=anudes]Not able to understand "&" operator after Student. It is... (by LB)
Having trouble with nested loops in fstream program
 
I'm doing a simple assignment and I'm having trouble outputting the intended output. Can someone help me gain direction in figuring out where the issue is? We'r...
[no replies]
by Mishu
bubble sort using linked list
 
kindly guide me thru the errors in my code..why am i not getting a sorted list? #include <iostream> using namespace std; struct node { int data;...
[no replies]
Program does not work
 
Review4.txt Objectville 23094 10239 –1 Bjarne City 4562 328 125 –1 My program cannot read the 5th line which is the cityname and the num blew it...
[5 replies] Last: thx, it works now (by XiangzhenWu)
matching text in a file
 
My question is how do you get a program to go through a text file line by line until it find a match and then displays a message #include <iostream> #includ...
[1 reply] : string::find() http://www.cplusplus.com/reference/string/string/find... (by nvrmnd)
Binary Search in Multi Dimensional Vector
 
HI Folks, Is there any option to apply binary_search algorithm for multidimesional (2D) Vector ?
[8 replies] Last: > error: cannot convert '....' to ‘bool’ in initialization std:... (by JLBorges)
cin >> x affecting value y...?
 
Hello there, I am not sure why this is exactly happening. I have forgotten most of my C++ coding and decided to do it again. It's suppose to be an easy code. Ba...
[1 reply] : the size py points to is zero, since y variable is zero upon allocat... (by nvrmnd)
insertion operator
 
Whats wrong with this code i tried but still it won't work why won't it pick the insertion function i made #include<iostream> #include<conio.h> #includ...
[5 replies] Last: Yes Thank you it works now , i get it we had to write ostream/istream ... (by Sharan123)
by wolfv
How to make ofstream global?
 
How to make an ofstream object global so that all class functions can access it? The example below is my failed attempt. Passing an instance of type ostream...
[4 replies] Last: Thanks L B. That fixed it. Makefile: all: a.exe a.exe: obj/main1.... (by wolfv)
by symbit
low coupling/ high cohesion?
 
I am studying OOD concepts, and am wondering if this code presents loose coupling/ high cohesion. If it doesn't, then how could I fix it? class Product{ ...
[no replies]
by Blank
input validation
 
i need help with my program please. i have to use the while loop in order to validate the problem. this is what i have so far, im not quite sure what to do n...
[3 replies] Last: The '!=' operator is the "not equal" operator. Basically, what is happ... (by TwilightSpectre)
file streams question
 
Can two separate threads access a single file at the same time using ifstream? If so, is it also possible for one thread to write to it with ofstream while the...
[2 replies] Last: It's really two different processes rather than threads. My mistake. A... (by DrZoidberg)
Inheritance Question
 
I'm doing some Arduino programming and I was trying to add functions to an existing class by creating my own class and inheriting the existing one. However, I'...
[3 replies] Last: Thank you both for the information!! (by fatirishman53)
struct Data Structure
 
struct foo{ unsigned bar0:1; unsigned bar1:1; unsigned bar2:1; unsigned bar3:2; }; When a struct data type is defined and there are ":" pl...
[2 replies] Last: Thank you (by thejosheb)
by PRW56
static variables declared multiple times
 
Hello. Every time I try to compile this it tells me that all of the static members in the Numbers class have been declared multiple times. The part that confuse...
[3 replies] Last: Is there a Tree.cpp also, or is it just Tree.h and the file contai... (by long double main)
fourth point
 
this is a problem from uva judge(10242).. and this is the link of the whole question http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&pag...
[1 reply] : [quote=tawsif95]where did I screw up?? You screwed up when you didn't ... (by LB)
Hashmat the brave warrior
 
The link for the qstn: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=44&problem=996&mosmsg=Submission+receive...
[3 replies] Last: I solved the problem after I posted this, so I did not bother to check... (by tawsif95)
January 2014 Pages: 1... 2829303132... 44
  Archived months: [dec2013] [feb2014]

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