Beginners - April 2014 (Page 37)

by zinat
file program issue
 
Write your question here. B17 -> B19 [label="{10}"]; B17 -> B21 [label="{4}"]; B18 -> B19 [label="{4}"]; Can any one help with the pointer solut...
[1 reply] : #include <stdio.h> #include <string.h> #include <stdlib.h> int wc(... (by zinat)
WHILE LOOP HELP
 
I am attempting to create a loop that asks for more money if the user does not pay adequately... my WHILE loop just keeps going even when temp = 0 it doesnt mov...
[2 replies] Last: line 54: You want an and condition, not an or condition. If amount o... (by AbstractionAnon)
by Odin13
Showing vectors
 
I have the following code, which works good, it is just for showing each element of a vector. void show_vector_char(vector<char> v) { cout << "VECTOR...
[2 replies] Last: > I've been told that I should pass the parameters by reference, > bu... (by JLBorges)
Help with HW using pointers and dynamic arrays
 
I'm trying to pass info from a .txt file into a struct I'm having trouble with the part of passing the classes into the string *courses. I have to keep the stru...
[3 replies] Last: Thanks I appreciate the help, sorry it took me a little bit to reply h... (by crutchlen)
Vigenere Cipher Decryption
 
I am working on a C++ project that will take a Vigenere ciphered text and make an automatic attempt at the key and decryption of it. I have found a very useful ...
[no replies]
Operator Overloading Error
 
Trying to overload << operator in my this program, (which I think is fine), I'm unable to compile the program, error which I get are written in the end #incl...
[6 replies] Last: According to wikipedia, Visual C++ 6.0 was released in 1998. If that's... (by Chervil)
by chofs
erase element from vector
 
hey guys can help me erase the first element in my two vectors i tried using vector.erase(vector.begin()) but my code is crushing.....any help would be highly a...
[6 replies] Last: line 12/13 erase the second element not the first. Remove the +1. An... (by coder777)
Please help aboout Bounding Box Collision
 
Hello. This is my first post here in cplusplus.I'm desperately in need of help right now cause I don't know how to make collision. I'm doing a maze game with 3d...
[no replies]
Compare 2 vectors
 
How do you compare 2 vectors with the same length? Example: vector<int> i1 = {1, 2, 3, 4, 5}, i2 = {1, 3, 2, 5, 4}, i3 = {1, 2, 3, 4, 5}; i1 ==...
[3 replies] Last: Hi, Function to compare two vectors for equality. template<typename... (by NVTKrishna)
Ifstream problem
 
Hello :) I'm trying to re-read a file multiple times, but something goes wrong. Here is the code: #include <fstream> #include <iostream> #include <stri...
[2 replies] Last: Thank you, it worked :) (by Guzfraba)
Function Pointers
 
Hello, I am writing a program that checks if a sort routine (in this case, insertion sort) being used is stable. For this particular program, I have to use func...
[4 replies] Last: If I implemented your code, what is the point of having code line 18 ... (by kbw)
Please help with code
 
I have been trying to find the correct way to do this for a while now: I need to convert either binary to all the bases but I keep running into errors. Th...
[3 replies] Last: 101 with base 3 -> 10 dec I get the correct answer. Strangely I don't... (by coder777)
by adrien
Why is it an error?
 
#include <iostream> #include <string> using namespace std; int main() { char tmp ; char tmp2 ; cin.getline(tmp, 15); strcpy(tmp,tmp2); cout...
[2 replies] Last: Thank you so much Guzfraba! (by adrien)
terminate called after throwing an instance of 'std::invalid_argument'
 
I want to convert a string to an array of integers. The following is my code. #include <iostream> #include <cstdlib> #include <string> using namesp...
[3 replies] Last: Thank you! I fixed it. ^^ (by question)
Initializing variables
 
How important is it to initialize a variable?Is it a good habit to initialize every variable to 0?
[3 replies] Last: un-initialized variable make program non-deterministic because each ti... (by anmol2701)
Class storage Errors
 
I need to Store the data points x1, y1, x2, y2 in the private section of the class as doubles Provide public member functions to set the values into the c...
[17 replies] Last: where did you declared the function GetDistance(), also the GetDistanc... (by anmol2701)
Binary Search Tree remove function
 
I am supposed to write a recursive remove function for a binary search tree. I believe my function is close to working, however when a number is entered that do...
[2 replies] Last: I tried adding the return on these lines, but it caused a segmentation... (by tls1019)
by lolo10
getting this error
 
// Test program for CarbonFootprint and implementing classes. #include <iostream> #include <vector> #include <string> using namespace std; class CarbonFo...
[3 replies] Last: ok. Great thx. (by lolo10)
Inheritance, overriding methods and basic UI help!
 
Hi guys, So I'm studying computer science and I've been given a (pretty basic) assignment, which I can't get my head around at all!! The tasks are as foll...
[2 replies] Last: Are you asking how to make the sentinel controlled loop? If so just c... (by CodeGoggles)
Help with do while loop
 
Simple program where I have to output the lowercase of an uppercase letter and vice versa. Can anyone tell me what to exactly put in the while statement so that...
[4 replies] Last: Please mark thread solved when happy with responses makes it easier fo... (by CodeGoggles)
April 2014 Pages: 1... 3536373839... 67
  Archived months: [mar2014] [may2014]

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