General C++ Programming - April 2014 (Page 40)

by keval
character sequences
 
According to http://www.cplusplus.com/doc/tutorial/ntcs/ " char myword = { 'H', 'e', 'l', 'l', 'o', '\0' }; char myword = "Hello"; In both cases, the array...
[5 replies] Last: Click to learn null http://www.cplusplus.com/faq/sequences/strings/c-s... (by Duthomhas)
by EngSux
Help with Functions
 
Hi, so I have been trying to compile this function to test it but I keep getting the following error in my program: #include <iostream> #include <cmath> #i...
[1 reply] : computeSolidity is a function. Should be changed to: y = computeSol... (by kevinchkin)
What does a *pointer before function mean?
 
I was wondering what magic does a * pointer before function actually do? Today our programming teacher asked us to look into it and explain it in the next class...
[2 replies] Last: I think the OP meant here: int z = *binary(arr); All this does is gi... (by closed account N36fSL3A)
SDL undeclared filename and apply_surface not working
 
I've recently dived into some SDL tutorials, but am having difficulty compiling this one in particular using DevC++ with the SDL library: http://lazyfoo.net/SDL...
[2 replies] Last: Thanks for getting back to me, all fixed up now! Alas I had forgotten ... (by blackmantis)
by dnulho
Turning an array and a vector into a combined linked list
 
I am trying to take an array of player mobs and an array of enemy mobs and turn them into a sorted linked list based on a data member within them. However I can...
[no replies]
by keval
character string
 
In C++, does char c1 = { 'M', 'Y', ' ', 'P', 'R', 'O', 'F', 'E', 'S', 'S', 'I', 'O', 'N' }; and char c2 = { 'M', 'Y', ' ', 'P', 'R', 'O', 'F', 'E', 'S',...
[5 replies] Last: Thanks :) I have a similar doubt which i have explained better in http... (by keval)
I have a problem with stl and class strem for I/O
 
Practically I must create a phonebook that must add new contact on the phonebook,sends, receives call and messages. This information must be written on the file...
[no replies]
Completely lost
 
So I have an asignment in which my teacher is wanting us to find the derivative and the integral of a function using pointers, however, I am struggling to under...
[3 replies] Last: We have been going over pointers and all he gave us was the function d... (by Kash12311)
"echo" meaning (bash scripting)
 
What does echo in a bash script mean? The code I'm trying to understand says: for((m=0; m<1;m++)) do #assign the correct mechanism to run RMFilena...
[3 replies] Last: The output of the program on the left of the pipe operator becomes the... (by LB)
Structure related query
 
In this code I am getting structure required on left side of . or .* error on this line ob .getdata(); please let me know am I doing anything wrong ? #inclu...
[6 replies] Last: Thanks LB.Now I have solved my problem and the code is working.Thanks ... (by mayur21)
How to add the play again option?
 
So , i had to make an rock paper scissors game . After lot of hard work and struggle ,I completed it but my professor rejected it since I didnot add option wher...
[1 reply] : I see you tried to use code tags, but you put the code after them inst... (by LB)
Tilde and Constructors
 
I have having trouble understanding what a tilde would do for a constructor. class MyClass { public: ~MyClass(); private: MyClass...
[1 reply] : ~MyClass is the destructor , which is called when the object either... (by LB)
Arraybag Unions
 
I got the error: Error:class"Arraybag<int>"has no member "Union", I don't know how to resolve it. --------------------------------------------------------...
[7 replies] Last: Yes, It was a mistake , I delete that, now where I should put Union fu... (by josea1288)
by SasQ
Implicit conversions to/from library type only in implementation
 
1. I designed two classes: Processor and Data . 2. Data represents some data object the user can pass to Processor 's public methods. 3. Internally, Pr...
[6 replies] Last: > Passing a pointer to some other derived structure might be dangerous... (by JLBorges)
Attempting to get data from lines in a file
 
I'm quite new to C++, so sorry if this is a dumb question! For a project we are given a file with a couple of thousand lines of values, each line having 9 di...
[5 replies] Last: Thanks a lot for the reply, some great things I can try implement and ... (by PCres91)
OpenGL Matrix Ops
 
Just a query on how everyone else does their matrix operations in OpenGL. There doesn't seem to be one _correct_ way of doing it, so I'm keen to see how people ...
[no replies]
Project Euler problem 13 issue reading from file
 
Greetings. I am having some trouble with a program I made for calculating the first 10 digits of the sum of 100 50-digit numbers (http://projecteuler.net/probl...
[no replies]
c++ developing BankAccount structure that creates a customer, transactions, accounts (uni assign help)
 
boys and girls, I thank you in advance for your help. C++ issues . I have university assignment struggles My Question: Below is my code that is not working can...
[1 reply] : You must use code tags instead of mix it within the text. That will sa... (by bufige)
Custom object
 
I have a very simple menu class: class Menu { int Option, numofOptions; void SwitchScreen() { Console::Clear(); //C++/CLI - clear console ...
[2 replies] Last: I've been making a menu using highlight to select options and I stucke... (by dleanjeanz)
Relation between Allocator and NodeAllocator in a Container
 
Consider a singly-linked list container. Being constructed with an alloc<T> , it will rebind it as alloc<node<T>> for internal use. Question: is allocator_...
[2 replies] Last: > Being constructed with an alloc<T>, it will rebind it as alloc<node<... (by JLBorges)
April 2014 Pages: 1... 38394041
  Archived months: [mar2014] [may2014]

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