Beginners - October 2016 (Page 24)

windows.h ReadFile() [beginner] problem
 
Hi, I am returning to c++ after a couple years, and with only basic knowledge, and am trying to go through different aspects of programming with windows.h (usin...
[1 reply] : GetFileSize function is your problem. The following website will help.... (by Izink)
Code is outputting the default in switch/case
 
it compiles but it always outputs the default #include<stdio.h> int main() { int a; printf("Choose 11,22,33,44 "); scanf("%d,&a"); fflush(stdin); s...
[3 replies] Last: Hello WHYISNTITWORKING3275, Line 14 should be: case 33: case 44: pr... (by Handy Andy)
convert function types
 
Hi, i am new to c++ programming and need help. The following code is an short example of the problem #include <iostream> #include <string> class A ...
[2 replies] Last: Thank you very much. I already found std::bind but I did not know abou... (by Wolffish)
Need help with readchunk program.
 
Currently I'm trying to write a program that requests a file from a web server and parses the file to count the instances of a string. In this case, I'm looking...
[3 replies] Last: Bump3 (by ManlyMartin)
Virtual function and abstract derived class
 
I want to make a base class (BaseTab) abstract and the derived class (AssetsTab) concrete, but the compiler is giving me an error that the derived class (Assets...
[2 replies] Last: Oh. Thank you! (by carlwryker)
Functions
 
I wrote the below code last week and need to change it to Create functions based on your existing source code (ex. GetCar, CreateCar, CalculateLapTime) which ta...
[4 replies] Last: I get that. Thought it may help speed the process up if it were in dif... (by channing0411)
by WeeDee
Why is this happening?
 
Just starter to learn C++ and wanted to play about a bit and for some reason the code is not working the way it should be. Why dose the switch not give any out...
[1 reply] : Why dose the switch not give any output? Line 23: This doesn't wo... (by AbstractionAnon)
by MoFyne
How do I enable C++11?
 
Hello, I have an issue with enabling C++11. In my homework, it says thag I have to start compiling the source file with "--std=c+11" on the command line. Howeve...
[2 replies] Last: No, two minus-signs is a canonical GNU option, and is valid (but GCC a... (by mbozzi)
Hey I need help with pass by reference
 
Hello! The goal here is to get the sum of (1/n)^2 aka: (1/1)^2 + (1/2)^2 +...(1/n)^2. Im using pass by reference to try to get the task done but I keep on getti...
[2 replies] Last: Ahh I see it now. Thanks for the reply and tips mbozzi :) (by babamublabla)
Word Counter Problem
 
So I've been working with XCode as my compiler for sometime with no issues. The problem I am working on is: ------------------------------------------- Wr...
[3 replies] Last: Hello deadmittens, Since no one has said it yet, you need to delete t... (by Handy Andy)
Memory leak?
 
Hello guys. I need Your help! Need to solve a task: User type an float array A. Need to copy positive values to array B, negative - to array C. I wro...
[2 replies] Last: I wanted to use int numNeg = 0; int numPos = 0; But this solutio... (by White Bear)
by cm123
even number
 
is this how you would write the chunk of code to see if it's an even number? number = 12; if (number % 2 == 0) cout << number << “ is even.” <...
[4 replies] Last: Yes thats the simplest way to check whether a number is even or odd. W... (by kamal choudhary)
Calculation from inheritance of different classes
 
I'm doing a question which includes a DineInMeal class, HomeDelivery Class and a HomeMeal class. The DineInMeal class is to instantiate a specific set meal and ...
[5 replies] Last: Please post the exact text of your error. homemeal header lines 8, 1... (by AbstractionAnon)
Creating a binary tree from prefix notation: Segmentation Fault
 
Wrong code.
[2 replies] Last: What code is meant to be inside the else (line 77 onwards)? (by Moschops)
new struct record in binary file per function call
 
I'm trying to store some information in a binary file. However, i met with a problem that i can't rectify. For example, if the first order comes in, there is ...
[5 replies] Last: I have edited the question according to your feedbacks. (by amoureux)
"Undefined Reference to"
 
I know this seems like a repetitive question but I just started writing some code until I came across this error, any reason why? Error: main.cpp:(.text+0x...
[2 replies] Last: linker is expecting Championship<Player, 11>::Championship(int s, co... (by codewalker)
Error Handling
 
I need to do some error handling in c++ that not only corrects a user if they enter a negative number, but also if they enter a letter or string. I need to use ...
[3 replies] Last: while (guess != number){ break; } O_o For the conversion, atoi()... (by ne555)
problem with loops and file
 
Hi. So I need to find which student has the most "10s"(which is the best mark). Im given the info from txt file: 3 4 10 9 8 9 3 7 6 7 6 10 9 6 7 10 5 The first ...
[2 replies] Last: Yes i know im missing it. I just didnt know what to put there, so i le... (by materialisticsociety)
How to access one private member in another class?
 
I am new to OOP. I am writing a class (call it ClassA) which needs access to just 1 private member in ClassB. How to I go about doing this? There is concept of ...
[3 replies] Last: You're looking for the keyword " friend ". class B { friend class ... (by Moschops)
by kmm96
labyrinth
 
hello, I need to run the program labyrinth . A sample labyrinth and its representation with a two-dimensional array LAB. Wall cells are marked 1 and free ones 0...
[no replies]
October 2016 Pages: 1... 2223242526... 51
  Archived months: [sep2016] [nov2016]

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