General C++ Programming - October 2016 (Page 21)

How to make program to calculate nautical miles between two points.
 
Hello. I am new to C++ and this forum. I was assigned a project to calculate the nautical miles between two latitude and longitude points. I wrote this. It runs...
[2 replies] Last: Sorry for late reply. Just wanted to say thank you for your help. You ... (by GobblingMonkey78)
implementing hash table with vectors
 
I wrote this program that is supposed to hash values and place them in a table. It uses 2 hash functions and 2 collision resolution strategies. The first functi...
[3 replies] Last: here is main: main(int argc, char **argv) { string s, s2, key; st... (by miamidawgs)
Need help opening PCap file
 
I'm trying to read the contents of a pcap file. Here is the code I have: #include <iostream> #include <pcap.h> using namespace std; int main() { ...
[6 replies] Last: I found https://www.winpcap.org/docs/docs_41b5/html/group__wpcap.html ... (by SamuelAdams)
Storing array elements into list
 
Hello everyone I need to ask a question regarding storing array elements into list. I have taken an array in argument and trying to store the elements into list...
[3 replies] Last: You're solution is a bit redundant. You could have just done this: ... (by Arslan7041)
Strategy to test variable simultaneously multiple times
 
Considering my limited knowledge, three months back in 2000 with no further practice or following, I believe there might be two ways to accomplish this feat: ...
[3 replies] Last: this is to test a pattern against a variable with a point range such a... (by Amateuer1000)
can figure out this problem
 
what am i doing wrong if a file prints out that: Studnt ID Ex ------- Assignments ------- Tot Mi Fin CL Pts Pct Gr -------- -- ----------------...
[2 replies] Last: so sorry i didn't even noticed: < #include <iostream> #include <fs... (by dekelelia1)
class Person program
 
Person.cpp #include "Person.h" #include <iostream> #include <stdexcept> using namespace std; Person::Person() { name = ""; age = 0; } Perso...
[1 reply] : So what's wrong with your code? It looks fine. (by theturk1234)
by MikeSW
Calling a function twice
 
I'm new to programming and tried hard to figure this out by myself, but I'm confused about how to write this. I need to write a program that displays a block o...
[19 replies] Last: :) (by closed account 48T7M4Gy)
How to use seekg
 
How do you use seekg to retrieve data from a specific line in a binary file? Lets say I want to read the third line in the file, I know I can't do seekg(3,'\n')...
[2 replies] Last: I have no idea why the seek/tell functions are specified to get ruined... (by Duthomhas)
Is there a better way to get the value of a preprocessor variable?
 
Why does this work and why do we need 2 macros? #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) #define AAA 500 #pragma message "content of A...
[1 reply] : Because macro arguments aren't expanded when they are "stringified", b... (by mbozzi)
by Lola02
Arrays
 
Help need it... Using a Bubble Sort Algorithm, sort the contents of the following array in ascending order. int numbers = {23, 46, 12, 35}; 4. Add ap...
[2 replies] Last: Thank you for the reply, now when i run the program it really doesn't ... (by Lola02)
Help me win!
 
My friend and I made a small bet of who could do a program. I have no clue how to complete this, please help! Haverly’s Needs a program to calculate the ar...
[10 replies] Last: @boost lexical cast It is advisable that you refrain from using unifor... (by SakurasouBusters)
by elay
writing the code twice
 
is it only alright to write the code twice? i mean when i start a new project i had to write the whole project(not the 100% of the project) within main functio...
[3 replies] Last: We all start writing code in main. The great thing about programming i... (by SamuelAdams)
Hecademical
 
Hello guys, I have a task that requires convertation between hecademical to 8th 10th and binary. And I face a problem that A = 10; B = 11 and so on. I cannot us...
[10 replies] Last: std::fmod() will compute the modulus for you. (by mbozzi)
How to transpose spatial coordinates into an array
 
Hello everyone, I want to start off by apologizing if this is an improper use of the forums. At first glance, this didn't seem like a terrible place to ask ...
[8 replies] Last: [quote=kemort]If you have the data then provided it is readable by gnu... (by keskiverto)
[Error] expected initializer before 'while'
 
I keep receiving this error, nothing I do helps it's in line 11, while (again == 'Y' || again == 'Y') //begins while loop Help sing std::endl; u...
[12 replies] Last: Got it I didn't close my execution window when I ran the program !! T... (by dreaweiss)
Distance Point Quadrics
 
Hi, I am looking for a library to compute the distance between a point and a quadrics! Thank you!
[8 replies] Last: Thank you for your replies, but the problem is not to compute the dis... (by keskiverto)
Class and Object
 
Hi! I am want to compare two values. First value is an input from user. which i stored in object variable. Second value is predefined. When i try to compare i...
[1 reply] : [quote=My compiler]warning: multi-character character constant [-Wmult... (by Peter87)
by Dkob1
Big Oh
 
Use big Oh to show the running time of each function in a deque that uses a doubly linked list for its implementation, and the deque space storage. Are each ...
[4 replies] Last: The question is somewhat ambiguous depending on whether the either sta... (by closed account 48T7M4Gy)
Baby Name Generator (1,2)
 
Okay so I am super brand new to coding and im trying to create a baby name generator I have this so far, but im super stuck on what to do next. I anybody can he...
[29 replies] Last: @nightskyxXx Yes you can. I would be glad to offer assistance. And i... (by whitenite1)
October 2016 Pages: 1... 1920212223
  Archived months: [sep2016] [nov2016]

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