General C++ Programming - February 2014 (Page 19)

Changing State Names to Abbreviations
 
The purpose of the code is to read in state names, say california and print CA. However, if it was a state with two words, it would read in only the first lette...
[1 reply] : #include <iostream> #include <iomanip> #include <cctype> #include <st... (by cire)
Can you code this for me? (short problem)
 
Im trying to figure out how to code this problem and i have no idea how it looks. Can someone please look at it for me? Here it is: Implement a sqrt function...
[1 reply] : Sounds and looks a lot like binary search: http://en.wikipedia.org/wi... (by Smac89)
by Foxar
_wrename in WinApi app.
 
So i am having bit of a problem. _wrename is not working out for me, and returns bizzare values, instead of 0 (succes) it returns 2 or 22; Here is part of the c...
[3 replies] Last: Anybody here willing to help ? EDIT: I compared errno against the err... (by Foxar)
What's the code? What's the code?
 
If I input elements I should get the Relative Complement of Set A from Set B. The problem is I don't know the code for Relative Complement. Here's what I've don...
[1 reply] : About this thread please take a look here: http://www.dummies.com/how... (by condor)
by tamcw
LNK2019 - unresolved external symbol, help!
 
I do not under stand what is going on with my code. If anybody can figure out what is going on, I would greatly appreciate it. My code will not compile. I keep ...
[10 replies] Last: > I answered what I believe is the underlying issue that the OP is ha... (by JLBorges)
by ASQ19
Explain what's going in this code
 
double *T; int *listprop; double **listval; double *Final_T; double *perm; double *permx; double *permx_orig; double *time_orig; do...
[2 replies] Last: ASQ19's code with code tags: double *T; int *listprop; double **list... (by Cronnoc)
by nadako
How to get around C2665 error
 
I keep getting this error and I would like to know how to disable it. What I am doing is weird and the code speaks for itself. //The full class is no...
[1 reply] : Can you post the actual error message? Most of us don't have the erro... (by Disch)
C++ bitwise operators
 
I am having a problem assigning bits a value of 0. The data is a 16 bit integer the bits greater than the 12th bit have garbage either a 0 or a 1. I would like ...
[5 replies] Last: So are you saying that the bits 0 - 11 are greater than the 12th bit?... (by Disch)
help needed-bitwise shift
 
Hello. I want to find a way to find the log_2 of a number that is supposedly a power of 2 using bitwise shift to improve the performance
[9 replies] Last: You should not assume you can do a better job optimizing your code tha... (by Duthomhas)
What's wrong with my output?
 
I'm trying to write a program that shows the output of the summation formula from k=0 to n C_(n+1)= ∑ C_(k)*C_(n-k). Here's my code: #include <iostream> ...
[1 reply] : Your problem was explained to you in the other thread you posted about... (by MikeyBoy)
trying to pass an array to and from a void function
 
Hello everyone, I'm trying to pass 2 arrays into a void funtion, and return values to one function. this is the the program I'm working with, after I'm do...
[6 replies] Last: It's fairly simple First: Fixing processArray function prototype you ... (by eyenrique)
X Macros, Is There a Compiler Flag or Something?
 
Hi, I was just playing with X Macros for some table generation consistency purposes, but I am running into some trouble with the pre-processing. I assume this i...
[6 replies] Last: OMG, I found it: I didn't have a space after LIST_OF_KEYS in it's defi... (by smcguffee)
Vector is different for every class instance
 
Okay so I have a class Student , which takes a number and a vector as a parameter for the constructor. Everything works well, until I output the values of the ...
[1 reply] : This is why you should avoid making classes that contain arrays of the... (by Computergeek01)
Count lines problem (File stream)
 
So I'm trying to count the number of lines in a text file that is inputed by the user. Also the code doesnt sum up the last number of the text file (exmp it cal...
[3 replies] Last: Thank you for your help. It works now! (by Anileda)
Matrix
 
The program that I wrote below outputs a random 3x3 matrix to a .txt file. I am trying to create/output a random diagonally dominant matrix to a .txt file where...
[2 replies] Last: I am trying to create a diagonally dominant matrix. My program is only... (by Binarydude87)
Logic question
 
I have a game board that looks like the following ( 4 3x3 tic tac toe boards): x | . | . | . | . | . . | x | . | . | . | . . | . | x | . | . | ...
[1 reply] : You should only need four bool functions for this: Horizontal_Win, Ver... (by Computergeek01)
by Chubby
Shifting the array
 
Write a function that accepts an array of integers and its size as arguments. The function should create a new array that is one element larger than the argumen...
[1 reply] : You're still using array offsets in shifted. Also, you're not setting... (by kbw)
Read From File & Insert into Linked List
 
Hey everyone, so I have a program and function i'm having an issue understanding. Here is what it's doing in the main. int main() { orderedLinkedLis...
[4 replies] Last: Great thank you very much! Appreciate the help. (by ImperfectCoder)
sleep function vs wait function
 
I came across another post in this forum: http://www.cplusplus.com/forum/beginner/15716/ In it, someone makes use of a custom "wait" function: #includ...
[3 replies] Last: Another useful difference to note between a genuine wait function such... (by Computergeek01)
Polymorphic Pointer
 
I have this code: #include <vector> #include <algorithm> class Object { std::vector<Object*> _children; // No QObject é usado um QList aqui Obj...
[2 replies] Last: Construction inserts the object into the parent's tree, but destructio... (by kbw)
February 2014 Pages: 1... 1718192021... 33
  Archived months: [jan2014] [mar2014]

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