General C++ Programming - December 2011 (Page 9)

Recheck for a file that is missing.
 
Hello all, I am building a program that utilizes many files located in the directory of the program. When going to open the file in question, the program ch...
[1 reply] : Use a while loop instead of an if statement. The waiting for keystroke... (by firedraco)
C++ scheduling
 
I've run a few programs with main loops that will go forever until the user exits, but these have always run asynchronously and take up 100% of a CPU. I'm writi...
[no replies]
Arranging Numbers like in a tabular and print them to a file
 
Hey folks, Basically my question is: "How can I write next to something in a file" For example in the target file stands: 30 23 45 . . . how can I th...
[4 replies] Last: I wouldn't blame the fseek function that it didn't work. How you said.... (by Dudovitz)
I need help with this file problem....???
 
Ok, the problem i am having with this problem is specifically number 3. i don't know how to take a specific piece of info from the file and convert it into a...
[8 replies] Last: whewww, i figured it out. i would like to thank everybody who helpe... (by brandonjconnor)
by Smoke
Printing Unsigned Char
 
Hi I am currently adding together two unsigned char however there seems to be 011 binary padding in result when printed. This my first time working with unsigne...
[6 replies] Last: You can store values like this: const unsigned char cd = { 1, 2, 3, ... (by aquaz)
passing string stream by refernce
 
I'm trying to write a message log function, but am struggling to do it efficiently. The way I have it now, I am building a string stream and passing it to a ...
[3 replies] Last: .... there is no error??? hmm.... not sure what I was doing wrong, I ... (by Boomn4x4)
vector inside of structure , how to assign value
 
Dear all, My program is.. #include<iostream> using namespace std; typedef vector<int> link_value; struct link_states { int c; ch...
[3 replies] Last: Dear BABU Prasad G, I happy to announce, that we can speed up finding... (by Ivan Sidarau)
Priority Queue reading from file
 
Dear All, Here is my successful programming only for reading the file and calculate it using the priority formula. After compile and it was give the correct ...
[1 reply] : Can anyone modify and add in to my programming? What? Do you want th... (by coder777)
-Weffc++ for clang 3.0
 
How can I enable the -Weffc++ flang while compiling the source code with clang 3.0 compiler?
[1 reply] : You can't. That's a g++ option. Clang does these: http://clang.llvm.or... (by Moschops)
Triangle Solver
 
I am trying to make a program to perform the Law of Sines and the Law of Cosines. My code is here: #include <iostream> #include <cstdio> #include <cstdlib...
[4 replies] Last: you don't need math.h but you need <string> this would look a lot bett... (by Aramil of Elixia)
Linked List Program
 
Here's my objective: Linked List In this program, you will implement a number of functions: 1. Insertion of a node to a linked list, by given c...
[2 replies] Last: check the above program...logic has been modified in the main..and som... (by jainabhikr)
Help with a "Has a" relationship
 
Can you help me fill in the Load function? I have everything else in place but dont understand how to begin loading the arrays? I need to do this in LoadInforma...
[no replies]
How can I make these functions chainable?
 
In line 88 of main, the following if statement executes: if ( sub.parse().isalpha().isdigit().isalnum().isspace().isempty().succeeded() ) My current implem...
[3 replies] Last: solution: for(; std::isalpha(m_str ); m_begin++){} ... (by AndroidZ)
Confused at Variable Scops
 
Hi consider this Program #include <iostream.h> int x; //global variable void main() { int x; //local variable for(int x=0; x<10; x++) { ...
[6 replies] Last: our teacher asked this question. thanks anyway, i got it (by mahdi87gh)
by Shant
Problem with saving to and reading from a file with many, many variables
 
I am working on a project involving civilization-style gameplay, and need to save country info to a file or many files I have seen many tutorials where 3 or ...
[no replies]
by c3sys
delete arrays
 
Hi, I have an api function which requires an array in the form double . I have initialized an the variable as follows. double (*CV) =new double ; I am de...
[4 replies] Last: Thank you. (by c3sys)
Evaluate my first game please (prompt)
 
Hello, I started C++ a month or two ago and I've been getting done with the basics. In the mean time, I created my first game using just the command prompt. I...
[1 reply] : I got stuck in an infinite loop where I was doing -3 damage evertime... (by Mats)
the name of object declaired with type name compair
 
I am trying to make a wrapper class based on the map class. I need to use the object declared with the third typename parameter, "_Compare", in the base map cl...
[2 replies] Last: >>¿Is this what you are talking about? http://cplusplus.com/referenc... (by prw8864)
sorting 3d coordinate points
 
hi guys. i want to sort a group of points.they are in 3d coordinate.how can i sort them in ascending form? below are my coding. Please hep me. I am still new.t...
[2 replies] Last: How does that even make sense? His question is 2 sentences, and his c... (by closed account 1yR4jE8b)
by Pyrius
Static object doesn't call its constructor?
 
I'm resizing a std::vector in the constructor of a class, and when I later try to access it the std::vector is empty. The following code reproduces the problem:...
[15 replies] Last: Technically this is not 'static initialization order fiasco'. That onl... (by m4ster r0shi)
December 2011 Pages: 1... 7891011... 39
  Archived months: [nov2011] [jan2012]

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