Beginners - December 2014 (Page 21)

how to access a const data structure
 
Hey this is more of a theoretical question, and I can't put code up for academic dishonesty reasons. I have an assigned project where I have a tree data stru...
[1 reply] : It sounds like you are confusing a pointer that is const with a pointe... (by Peter87)
numbers guessing game
 
Reading Stroustrup: Programming -- Principles and Practice Using C++, chapter 4, exercise 4: "Write a program to play a numbers guessing game. The user think...
[no replies]
linker vs. compiler
 
Hi everyone when we want to add a library, does we add it to compiler or linker. somebody says that we add .h file and .cpp file to compiler and .dll or .exe...
[1 reply] : If you want to call functions in a library, you need the .h file for t... (by AbstractionAnon)
by far123
cin.ignore & cin.getline
 
#include<iostream> #include<fstream> using namespace std; struct sign_up { char user_first_name ; char user_last_name ; int age; char date_of_birthd...
[2 replies] Last: thank you sir (by far123)
how to check if the user input is in the array list
 
*this is just a chunk of the code. the others arent that important what the program is supposed to do: - asks the user for a title. - searches the array if its ...
[3 replies] Last: Make sure that the code that reads from the file works. (by benbalach)
help with a little question
 
How save Coordinate on a array? I have a program that work with portals, but no is exactly a portal, because first I tell me that a array of 10^9 and so that...
[3 replies] Last: You didn't answer the question. I didn't ask what icant is. I aske... (by AbstractionAnon)
file handling in c++
 
I want to write a program that take a 6 digit number from 1 text file and match it with another 6 digit number in another file. if matched display it on the sc...
[5 replies] Last: Only if you know exactly how many numbers are in the text file. Use s... (by benbalach)
Problem with a function that reads a stream until eof.
 
Write a function that takes and returns an istream&. The function should read the stream until it hits the end of file. The function should print what it read ...
[2 replies] Last: You can also do std::cin >> foo >> bar; There the std::cin>>foo retu... (by Hashirama senju)
Curl doesn't work for some reason.
 
Hello I'm trying to get the source from a website using Curl. But for some reason, the code ain't working. This is my code: curl_global_init( CURL...
[1 reply] : Someone able to help me? :) (by Nielyboyken)
For Loop
 
why the output isn't same as the input? please correct the program #include<stdio.h> struct mhs { char name ; int nim; }; struct data { ...
[9 replies] Last: Hope you understand what I did. Otherwise... just ask. (by minomic)
Prime numbers
 
Hi, I`m getting error when trying to compile #include <iostream> #include <vector> using namespace std; vector<int>prime; bool is_prime(int...
[4 replies] Last: #include <iostream> #include <vector> using namespace std; { ve... (by pacman169)
References as Defines
 
Hello, I am having some trouble using references (int & foo;) to work the way I want them to. I am trying to use them as a was to #define a static class vector ...
[6 replies] Last: I understand. Anyways, I will close this. Thank you guys for your help... (by Spikerocks101)
Rotating Sentence
 
Hi everyone .. I need your help with this Rotating Sentence ROTATING SENTENCES Input File: rotate.txt In ``Rotating Sentences,'' you are asked to rotate ...
[2 replies] Last: im so sorry .. anyway tnx for the hints (by fifthSage)
Help with calculations
 
Hi, I've written this code for homework (this is part one) and now I have to do a part two by modifying my code. I'm a little confused as to how/where implement...
[4 replies] Last: and also add a variable that will hold the tax. i mean the 10% off so ... (by xenovia12)
by vxk
nested friend classes implementation
 
why does a friend class need a object to access the private functions of the "otherclass" , but the "otherclass" member functions dont need an object to access ...
[6 replies] Last: Sorry, I might have misinterpreted your question. I thought you where ... (by Peter87)
Linked list and pointers
 
I'm having troubles doing a shuffle for a linked list. I've tried numerous ways to make this work but I'm having issues. What I believe to be the problem with i...
[8 replies] Last: The good thing about standard library is that it is documented. For e... (by keskiverto)
tictactoe
 
im trying to write tictactoe using struct. #include <iostream> #include <cstdlib> #include <ctime> using namespace std; struct board { int board_height; int...
[no replies]
Struct, Array, Loop
 
I'll make C Program that input 5 data and output that data again, but why the output data same as the fifth data? please help #include<stdio.h> struct mh...
[1 reply] : The problem is that a and b are objects, not arrays. Change line ... (by benbalach)
Readin integers and names from a file
 
Hi, I'm supposed to readin names and 3 test grades for each and find the average, now I got the entire code done but I still can't figure out how to readin the ...
[7 replies] Last: To remove all potential bugs from your code and to make it simpler I r... (by benbalach)
by Zizael
Need Help with Tic Tac Toe Game
 
My code isn't out putting when someone wins even though they get 3 in a row. I think there is something wrong with my function bool hasWon(string boardPos );. I...
[no replies]
December 2014 Pages: 1... 1920212223... 55
  Archived months: [nov2014] [jan2015]

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