General C++ Programming - March 2016 (Page 22)

using linked list store data
 
I am writing a program about storing some data using linked list.However, I dont know the steps to store the data.Could you help me to do that? Here is the cla...
[2 replies] Last: int main() { info * record 1. Statement must end with semicolon. ... (by keskiverto)
RAISE Questions
 
There are two questions. I did the first question but i didn't understand the second question. Here is the questions. Write a program that has user enter a s...
[1 reply] : When posting code, please use code tags. Highlight the code and press ... (by dhayden)
Using static const int as member variables of a class
 
Hey, I am using GLFW for my windowing & input system. I want to define each GLFW_KEY as a static const int in my KeyCode class. (Note that GLFW_KEY_<id> is an #...
[no replies]
by ec252
Please help with program using arrays and random numbers
 
Here is my code. We have to create a snake game. However I am really struggling to get ONE asterick to appear randomly on my snake array. I do not need anything...
[4 replies] Last: Here's an example: #include <iostream> #include <time.h> #define XM... (by mgoetschius)
by KentaH
Polymorphism - in cplusplus tutorial
 
Hi guys, I found below code when scanning the Tutorials and couldn't help wonder, isn't this a bit dangerous? Sure the code will work, no question about it, bu...
[10 replies] Last: @KentaH All I see in this thread is people trying to help explain thi... (by MikeyBoy)
by josex
Newton Method
 
Can you help me with what my teacher wants. First I am going to show you what she email me, then my coding. Please help me by over writing it. Thank you so m...
[2 replies] Last: Message for ne555: Thank you so much for your help. I am a physics ma... (by josex)
by josex
C++ need a formula in my coding
 
Below my coding print out a graph and changes the marker style and color. Next I have to Replace the (100*exp(-x/1) (shown in my coding below) and replace i...
[1 reply] : http://bfy.tw/4WiW (by helios)
Binary Search Algorithm
 
I'm writing a program that takes a sorted array and searches through it using a binary search. I already have the sort all worked out, I just need some help wit...
[9 replies] Last: I think maybe I've not given as much help as needed here, so let's go ... (by Chervil)
by aruggs
C++ Roman Numeral Calculator
 
Need some help here. Trying to create a calculator that does the math when inputtng 2 roman numerals and an operator. Below is my code it complies fine but wo...
[2 replies] Last: If its worth doing, its worth 'over-doing'. My Roman Numeral calcula... (by da peppester)
Why does sizeof and _count work on static array but not dynamic array?
 
I can see that arrays and pointers are fundamentally the same i.e array decomposes to a pointer thus for int x , x on its own gives address of x just like if I...
[3 replies] Last: I am made more curious by the last statement which says "Yes, the syst... (by curiousengineer)
default values
 
Give an example to illustrate the use of default values. Does it make compiling more efficient? Does it make the object code shorter? Why do we use it?
[1 reply] : void SetValue(const int val = 0); int main() { SetValue(); SetVa... (by coder777)
the packet size of using socket
 
I have a question about socket programming. When I use socket to send the data, we can use the API such as sendto() to send using TCP or UDP. For sendto(), we ...
[1 reply] : The fragemtation depends on the underlying hardware on the sender and ... (by coder777)
HELP ME REVERSE PLEASE?
 
The following code translates english to pig latin. I need it to do the opposite, basically I need the user to enter a pig latin word such as "igpay" then remov...
[1 reply] : To erase the last letters you can use erase(): pigLatWord.erase(pigL... (by coder777)
How to output function
 
How can I call my function using POSIX threads. For example, when executing code I would like thread 1 to call my function while the program is executing. Any r...
[1 reply] : The only way to determine which function to call will be in the provid... (by coder777)
Function trouble
 
#include <iostream> using std::cin; using std::cout; using std::endl; int reverse(int n); int main() { int number; cout << "Enter a number between 1...
[2 replies] Last: In case you want to convert the string back to an int. http://www.cplu... (by integralfx)
string streams
 
Why would a programmer want to use string streams, specifically objects of istrstream and ostrstream classes, for handling input to and output of a program?
[3 replies] Last: specifically objects of istrstream and ostrstream classes Actually, ... (by andywestken)
Inline function in C++ and its usage with example
 
What is an inline function? Give two techniques to declare a function inline
[1 reply] : Read the study material that you have. Websearch for more. (by keskiverto)
by SVDW09
Programming Assignment Help
 
I'm having trouble with my C++ programming assignment. A mail order company sells 3 products, A, B, and C. The prices for these products are $1.99, $2.99, and...
[5 replies] Last: After a few minor adjustments to your code, I finally got it to work p... (by SVDW09)
by systux
What is DWORD?
 
What is a DWORD and why use it? I read that its basically an unsigned long. But why used unsignedlong/dword when i can just use something simple like int?
[5 replies] Last: hmm, i see. interesting (by systux)
I need help please
 
runs only the first part. #include<iostream> #include<fstream> #include<time.h> #include<conio.h> #include<stdlib.h> #define T (char*) void almac...
[1 reply] : There are a lot of things wrong with this code. A major one is that th... (by aphillips801)
March 2016 Pages: 1... 20212223
  Archived months: [feb2016] [apr2016]

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