General C++ Programming - November 2018 (Page 7)

What is the differnce b/w seekg() and seekp()?
 
What is the difference b/w seekg() and seekp()? Similarly what is the difference between tellg() and tellp()? Does they depend upon how I open my file in readin...
[2 replies] Last: it may be a little confusing because they cannot be different on file ... (by Cubbi)
by faiq12
Lexical Analyzer in c++
 
i want to read a file which in first line contains rows and in second line columns and on its basis allocate dynamic array after second line transition table ex...
[1 reply] : it looks like you wanted a dynamic array size but you made those const... (by jonnin)
Word Count
 
Hi, I have to create a simple program that can compute the number of words, bytes, and lines that are represented in a string. I have a bit of a problem because...
[5 replies] Last: Hello, Here is a snippet with a very useful utility. Best regards. ... (by laedus)
How do you make your code want you to type an answer to continue
 
How do you make your code want you to type an answer to continue? #include "stdafx.h" #include <iostream> #include <windows.h> #include <string> using names...
[3 replies] Last: On line 24 use getline(cin, answer); instead of cin >> answer; . W... (by coder777)
Print magic array
 
I've created a program which works as it should, it has an array and it prints out the array in a 3x3 square. However when revisiting the program I've got confu...
[7 replies] Last: Yes, but you forgot one thing: what does happen after j has become 3 a... (by keskiverto)
Regex Help
 
Hello I am working on a problem that involves using Boost Regex I have a string 66{Test1}{Class}.zpl I need to use Boost Regex to : 1) Get the length...
[5 replies] Last: Hi mbozzi That is exaclty what I needed thank you for your help. tbp... (by rrodriguez48335)
IF statement to control value range
 
How would I control the data range to ensure a mark entered was between 0 and 100, if it is less than 0 and greater than 100 it is invalid. I know this can be d...
[2 replies] Last: I'd create a function to do it: // Prompt the user with "prompt" and ... (by dhayden)
by Haveed
I am unsure on what im doing wrong.
 
Im not sure on what I put inside my 3 files, Shapes.dat, Area.dat and Perimeter.dat. Am i only supposed to use 2 files? or 3 files. Instructions: The progr...
[no replies]
Calendar Program
 
I have to make a code for a calendar to show any date that the user asks for and then when the user gives the code the information that it asks for it should pr...
[16 replies] Last: Didn't you use tpb's snippet to calculate which day the month started ... (by Satan)
by Ryan15
How do I use else if
 
I'm making a simple program to calculate worker pay but the else is having an error saying it's expecting a statement. The program requires user to input their ...
[19 replies] Last: @jonin but he used '\n' in his own original post ;p! @Ryan, Unless in... (by Satan)
QSort, Merge, Heap, and Shell Sort
 
Does anyone happen to know where I can find code examples for timing anaylsis for Qsort, Merge, Heap, and Shell Sort? Any information would help!
[3 replies] Last: type 'best case for shell sort' and hit search ;) https://en.wikipedi... (by jonnin)
by faiq12
Compiler Construction compaction code in c++
 
this code is reading file which will be given randomnly by our teacher which contains in first line line rows in second line columns and then begins transition ...
[1 reply] : hint... if you read the file in transposed, you can check rows with a ... (by jonnin)
Cannont convert
 
im getting a compiling error: cannot convert ‘const LinkedList<int>’ to ‘LinkedList<int>::Node*’ in initialization is there anyways to fix this. #inc...
[6 replies] Last: The thread has been marked as solved so perhaps you no longer need hel... (by Peter87)
weight across planets problem
 
I am trying to write a program that will incorporate enum and the purpose of the program is to take user's input (planetName and weight) and calculate the weigh...
[10 replies] Last: Nice! Ive said it before, but maybe this will help a bit going forwar... (by jonnin)
Exceptions not getting when using shared c++ library
 
I have an executable test which is linked to a shared library libtest-lib.so. All I am doing is throwing and catching an exception from the executable and call...
[2 replies] Last: The following code works on my W7 machine: test.cpp: #include "test... (by Enoizat)
by volang
Chat MULTIPLE clients
 
Hello guys! The method below is the only way I know how to achive a "chat function". Other/better methods are welcome. Lets say we have 4 people/clients in a ...
[2 replies] Last: Thanks man. This seems interesting. I'll dive into it (by volang)
Maximum score of a linescore
 
I am stuck on this problem that I have been trying to work for a while i am just looking for some direction because I'm lost and I don't know how to approach it...
[5 replies] Last: What have you tried so far? Can you post your code with an explanation... (by Browni3141)
Overloading Operators using Time Object
 
I have a task to implement the overloading of the operators: -- (pre and postfix), -, -=, <, <=, >, >=, == and !=. I have managed to do most of these, but I am ...
[1 reply] : You can't assume that if n > sec (i.e., sec -= n goes negative) that y... (by tpb)
by volang
Socket support and keep alive connection
 
Does every webbrowser support sockets? If not, how do I detect this when the client connects? And is it possible to reiceive a request if the client doesn't sup...
[2 replies] Last: In a console application a made before the connection between the clie... (by volang)
How Can I Write This Program Using an Array of Structs?
 
I have an assignment below that I am working on. I also have a skeleton of a program down below that I need help with. How can I finish writing this program? W...
[6 replies] Last: The single most important bit of my post is this: Honestly, you use ... (by MikeyBoy)
November 2018 Pages: 1... 56789... 12
  Archived months: [oct2018] [dec2018]

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