Beginners - May 2016 (Page 11)

by ptitz
Why doesn't updating pointer variable change the variable that it points to?
 
I've got a class called state class State{ double x,y,z; std::vector<double *> state = {&x,&y,&z}; void set(int id, double val){*state = val;} }; Most of ...
[2 replies] Last: Yeah, super! Actually I've had a lot of problems pop up in the rest of... (by ptitz)
dsda (1,2)
 
sdasdsada
[30 replies] Last: @JLBorges: I understand sir. Thank you for all your help. (by lynlyn9)
by wavy19
regarding headers(unknown type name!,nested too deep;y)
 
hello there hope you doing well. so i have this problem when i am trying to make a declaration for a child class in a parent class it gives me this error: unkn...
[2 replies] Last: Are you sure this relationship makes sense. What is an "events" and is... (by Peter87)
Help with my program homework
 
I have no idea how write this code. anyone can help me? Write a program that uses stacks to evaluate an arithmetic expression. The program takes as inpu...
[1 reply] : can you post some code, things you have attempted? You can get lots of... (by Bdanielz)
Find Lowest and Highest of Array
 
Hey guys, I am having trouble with finding the lowest and the highest of an array. Basically, there's a string array shown below and an int array. I want to fin...
[10 replies] Last: const int size = 5; int a ={2,5,3,87,9}; int min,max; min = max = a ... (by Ericool)
Char array questions
 
Questions from a noob here about char arrays. So I understand that operator<< is overloaded for char* to print all characters until the null terminator, so u...
[7 replies] Last: > So in c++11, char* is different from char ? In every version of C++... (by JLBorges)
How can I achieve this?
 
I want to be able to ask the user for a number, and then I want to delete the sentence and replace it with another sentence without the program moving onto a ne...
[4 replies] Last: Hi, Check out the ncurses library Good Luck !! (by TheIdeasMan)
Draw a circle in opengl but a line is going from the circle to the origin point
 
Hey guys, so I'm working on a game engine type thing right now and i have a sprite class that will be handling initializing and drawing shapes to the screen but...
[2 replies] Last: oh whoops sorry, i should have specified i tried taking the sine and c... (by zee2200)
loop coding problem
 
/* Question : * Modify the program to find the sum of the * square of the numbers from 1 to an upperbound * ie, 1*1 ,2*2...
[14 replies] Last: Thanks ^ dhayden I understand it . (by Antereson991)
Using 3 classes in C++
 
Hi there. I'm having trouble with my classes. I'm creating a program that gives you all the information that you need when you place an order, and I've complete...
[2 replies] Last: Ah. I see now what the problem was. I need to use a public method inst... (by jaykeblakk)
Classes and pointers to a vector
 
I have an assignment to use a previously created class and vector to take names as input, create and assign them to a new pointer, and then store them in the ve...
[3 replies] Last: You can print std::strings using std::cout << , but note that your ve... (by helios)
how to use random() function in dev c++?
 
ow to use random(25) function in dev c++? which header file will use here?
[3 replies] Last: The solution is stated in the error message: use the -std=c++11 comp... (by Peter87)
How randomize() function works on dev c++?
 
How randomize() function works on dev c++? which header file is used for this function?
[no replies]
how to use delay function on dev c++
 
this program dont work on dev c++ , how can i use delay() function on dev ? #include<stdio.h> #include<stdlib.h> #include<iostream> using namespace std; ...
[2 replies] Last: thanks chervil (by abdullah ibrar)
Looping Confusion
 
"The program should have a loop that allows the user to continue entering numbers until an end sentinel of 0 is entered." (From the comment block) I attempte...
[2 replies] Last: Thanks so much, I also have learned a new thing today. The "!". (by closed account 3voN6Up4)
by coll97
Searching words in a text
 
Well I have this funcion: vector<string> SequenceOFwords(); //The number of strings is undefined. void the_right_text(Text& t, SequenceOFwords&){ } --------...
[no replies]
by evy
stdafx.h problem
 
i did small project ..when i try to run it the compiler says did you forget to add stdafx.h to your cource files and when i do it to all my cpp files its say...
[1 reply] : When you create a project turn off the precompiled header file option. (by Yanson)
How to make a bi-variable equation solver?
 
Like y = 51x - 51; y = 31x + 22; How to make a program to get the results of x&y? thx :)
[no replies]
Reading from URL
 
How can I read wordox lettters. I want to write a program that will read the wordox letters and display them on the console. how can do that? wordox is a game ...
[no replies]
File stream condition. To Read if file has content else write info
 
What condition shoul i use? if notepad/file has contents it will display the contents. but if the notepad/file has no contents, it will automatically let th...
[2 replies] Last: Edited my code. I'm sorry but how do you do it? (by Cheche01)
May 2016 Pages: 1... 910111213... 36
  Archived months: [apr2016] [jun2016]

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