General C++ Programming - March 2014 (Page 9)

Question about sorting a user input for array
 
Hello, I need help with my code. Were supposed to be able to sort an array which is user input, but the first number they input is supposed to be the length of ...
[6 replies] Last: Ok I got it. Thank you to all who posted!! (by jimmy107)
by LB
Wide strings vs UTF-16 strings
 
I've been needing to deal with the world of Unicode recently and am confused about a few things. For one, what's the difference between Microsoft's Unicode, UTF...
[5 replies] Last: Thanks guys, that clears things up very nicely. (by LB)
by mbw290
Help with card game war
 
I am working on the card game war. I have setup three linked lists, one for each player's hand and one for the war cards. When a player hits war, I try to tak...
[5 replies] Last: Link *lastItem = new Link; // lastItem points to a ... (by cire)
Templatized Member Function Of Non-templatized Class
 
Hello, this is my first time posting on these forums and my first time working with Templates so I do greatly appreciate everyone's time, thank you. I'm crea...
[2 replies] Last: That did the trick thank you! (by Kyle Klouzal)
Linked List Class node
 
Hello. I am studying this sample code for linked list class node implementation. I've studied this code for hours and I am not 100% sure how this code keeps tr...
[8 replies] Last: Okay, everything makes sense now. Thanks for helping (by jshm415)
fizz buzz
 
So this is a question from codeeval. which is fizz buzz. The link is here(https://www.codeeval.com/browse/1/) I get a wrong answer cannot understand why. I did ...
[2 replies] Last: cool got it. thank you. (by generic2709)
Tile Replacement and Collisions in SDL
 
Hello people, I'm quite new to SDL and I need this game to be finished VERY soon for the TSA state competition. Anyways, the issue I'm having, is how to replace...
[1 reply] : void Tile::show() { //If the tile is on screen if( check_col... (by fine858)
the sieve of erastosthenes
 
Can someone help me get this code to run PLEASE? #include <iostream> using namespace std; void sieve (int array , int num); void goldbach(int array ,...
[8 replies] Last: @ kbw THANK YOU SO MUCH FOR YOUR HELP! I have fixed everything. (by dadapro)
by IsaacD
The size of my disk?
 
I'm trying to write a program that without caring about the file system writes bytes to a disk. Here is how I do this: #include <iostream> #include <unistd.h> ...
[5 replies] Last: hmmm that might be a good idea. it might be worth it to see the source (by Little Bobby Tables)
Problems with Doubly Linked List
 
Hello, im new to this forum and C++. I am doing c++ program to read coordinates from text file into double linked list. Everything seems to work perfectly but i...
[2 replies] Last: thank you for your respond. I sorted problem out (by marijus5012)
Making a class 3D vector on C++.
 
I want to define a class Vector, representing a 3D vector with the following methods: display - to display with <<cout>> an object Vector; e.g. 1.0 3.0 5.0 co...
[2 replies] Last: First of all, do you understand what a vector is? To put it simply, it... (by TwilightSpectre)
by KQ5
Error: expression must have (pointer-to-) function type)
 
On line 7 of my code I declared a constant in the global scope called pi. I then later tried to use it in my function called circleArea that i defined on line ...
[2 replies] Last: Thank you (by KQ5)
output numbers from a set of list that weren't used
 
This is one part of my program, I need a loop that checks through the input(specifically the agent numbers) and then outputs the agent numbers that aren't in th...
[1 reply] : _ indent your code _ http://www.parashift.com/c++-faq/istream-and-eof.... (by ne555)
by Wake
ifstream file path
 
Hi, need some help, I am using the code below to read a file, but I can not enter the file path, I always have to move to the folder where I'm running the...
[3 replies] Last: thanks for help! I use \\ (by Wake)
What do "new int[2][3]" ?
 
What do and what data type return this expresion ? new int I have tried this: int* p = new int ; But it causes a compile time error: ...
[8 replies] Last: Here is the solution: // m is a matrix of 2 dimensions whose dimens... (by DavidIRE)
by AceK
Program to run my webcam
 
Hi everyone, I want to write a program that is going to turn on my webcam and then display whatever the webcam is pointing at on the app. But frankly, I have no...
[1 reply] : This is kind of complicated for a forum. You could check out OpenCV an... (by ac517)
by Kap
segmentation fault.memory error when looping over the function
 
Dear all, It is been several days that I am stucked with the segmentation error and I do not know anymore what to do I try to do a loop over my function but it...
[4 replies] Last: OK, double* p is a local variable to the solvep function. So every tim... (by ac517)
by CRooky
Sales Exercise 02 any ideas..?
 
Hey everyone im working on this assignment for my c++ intro class what i need to do is..start my program like this: ** start of program *** Enter filename("...
[1 reply] : The compiler isn't finding a definition for lastName. // Step #11 ... (by wildblue)
Weather analysis assignment
 
I am having a huge problem. I've been assigned an assignment where I am supposed to ... 1. Declare the file objects for the two input files (location 1 (IL) & l...
[1 reply] : Reading/writing your files: http://www.cplusplus.com/doc/tutorial/file... (by mutexe)
shifting bits away and shifting bits back
 
Value x is a 32-bit unsigned integer 3: 00000000000000000000000000000011 If we use bitwise-shift to shift all bits to the right by 2, x is 0: 000000000...
[2 replies] Last: In other words, when we perform right shift which clips away the leas... (by mutexe)
March 2014 Pages: 1... 7891011... 36
  Archived months: [feb2014] [apr2014]

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