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

by twesna
Help with program
 
So I have to make a program that allows the user to enter bot positive and negative numbers and the program is suppose to calculate the sum of only the positive...
[4 replies] Last: Rather than not initialize userInput it might be better to give it s... (by cire)
While Loop Stops Output
 
So I was using an article on this site to give me ideas on what to program. I came up on the "Pancake Glutton" idea, and decided to give it a try. As I was test...
[2 replies] Last: for (int i = 0; i < 10; i++) { if (customers > pancakeNumber)... (by Maharaja)
Game Design
 
I'm new to c++ programming and decided it might be an option to create a console game. Specifically a simple RPG. However I have done loads of research on it ...
[2 replies] Last: Very helpful thank you =) (by Masterassassin1398)
Power Button
 
Its me with my questions again :) Does anyone know if/how you can make a c++ program that checks to see if the user presses the power button on their comput...
[1 reply] : That'll be handled in the ACPI. That's where you can start your inves... (by kbw)
Programming a Camera in OpenGL
 
Hi Everyone, I just finished going through NeHe's OpenGL Tutorials and I'm trying to understand how to program my movement through the world , based on the m...
[14 replies] Last: Your scene is moving around your camera. Your camera is always facing ... (by NoXzema)
Sorting Strings Issue
 
Hello! I have a problem that needs me to load a char array from a file, make every line of that array into a string, and then sort the strings. EX: bgtf bhgy...
[1 reply] : #include <cstdlib> //rand(), srand() - wont need #include <ctime> //... (by iQChange)
Testing for References to Identical Objects
 
I am checking to see if two references are bound to the same object. My instincts tell Me, "Check their addresses. If they match, they are bound to the same." A...
[4 replies] Last: Unless an object is a bit-field or a base class subobject of zero siz... (by JLBorges)
copy constructor-error in the insert before and after, can't find the problem
 
I can't find why it won't output the correct info for the array. I've looked until I am ready to throw the computer out the door. I'm at my wits end trying to g...
[3 replies] Last: http://www.cplusplus.com/forum/general/112111/ foo.cpp: In member fun... (by ne555)
Dealing with Vector Arrays
 
/* I am new with vector arrays, This is basically a parking slot which can store 10 vehicles at a time. There are 2 classes, one named parking which stores the ...
[2 replies] Last: The logic in your code is hard to understand (and the lack of code tag... (by keskiverto)
GetWindowText and SendMessage return Default IME
 
Ok so i'm creating a Dll in Visual Studio 2010 Prof. and using GetWindowText and SendMessage both return "Default IME" instead of the Windows Text. OS: Windows ...
[5 replies] Last: I'd say that line 16 is a problem. Either use new on line 16 or Loca... (by coder777)
by lcsgz
Problem when read txt file C++
 
Hi guys. Here my code: long len; char* buf = NULL; FILE* fp = NULL; fp = fopen( "File.txt", "rb" ); if (fseek( fp, 0, SEEK_END ) != 0) { fclose( fp );...
[1 reply] : change buf = (char*)malloc( len ); to buf = (char*)malloc( len + 1)... (by coder777)
Accept multiple data types then decipher the type
 
Basically I do not want to use a menu, instead just accept either an float or a single character. Then send the data to the appropriate spot based on the user i...
[3 replies] Last: Another function you might be able to use is peek. http://www.cpluspl... (by doug4)
Static variable not maintaining it's value
 
I've been toying around with a multitude of topics including function templates , exceptions , making use of files , and in turn, using a static variable f...
[3 replies] Last: You could also try a functor class something like this if you wanted t... (by doug4)
openGL MATRIX transformation question
 
Hey Everyone, When we move around our Scene using Matrix transformations such as glTranslatef and glRotatef, are we modifying our vertices coordinates or are...
[2 replies] Last: Thanks for the answer. What i'm trying to figure out is, if I'm using... (by Cydriic)
Atbash
 
Please, help me with the following two errors, I cant't understand what happens: 1st) Error 2 error LNK2019: unresolved external symbol "char * __cdecl d...
[8 replies] Last: No, 'frasecifrada' is pointing to 'frase' that was not dynamic allocat... (by ne555)
How do I create member function to represent embedded task in C++
 
The following code is an example of how task are created with micro cos III in c. I am trying to figure how to create similliar code in C++. My problem is how d...
[2 replies] Last: What I would like to know is how do I create member functions to repre... (by glennpl)
Merging two int text files
 
I have come up with code for this, but am currently having issues finalizing it. It seems that it only puts out some of the numbers in a numerical order, but no...
[9 replies] Last: What is the point of passing empty streams? For a homework, nothing,... (by Duthomhas)
Problem with sorting using rand()
 
Hello,i'm sorry to bother you with simple question like this but i'm learning c++ and i can't seem to figure out why am i not getting a sorted version. code: ...
[3 replies] Last: Thanks! (by herman13)
Using array initialisation list for my own class
 
Hi geeks, i'm currently working on a research project and i've been given some specifications, one of which has been giving me a very hard time solving so i jus...
[3 replies] Last: Thanks guys! This place rocks! Though the solutions aren't what i real... (by Olyboy16)
Checking if a program is running
 
I have a question, how can I check if a program is running using c++? For example if (notepad.exe is running) { blah blah blah
[3 replies] Last: You use that function that kbw showed you. This unfortunately requires... (by NoXzema)
June 2014 Pages: 1... 7891011... 21
  Archived months: [may2014] [jul2014]

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