Beginners - January 2014 (Page 33)

by kaiwei
How to construct an temporary array in a function?
 
I am trying to write a merge sort function using divide-and-conquer method like this: void mergeSort(int *a) { //... } In this function, I have t...
[4 replies] Last: [quote=Smac89]There is a way to find the size of the array using the s... (by cire)
Dice Game
 
I have this dice game and it has the user input the number of sides on the di. When I debug it it prints the cout statement twice and I am confused. Where is my...
[2 replies] Last: Wow. Eureka. It works. Thanks Storm. (by faust058)
by xeef
UINT message to Notifycation (0x0020 --> WM_SETCURSOR)
 
is there any function to conwert notification codes to notifications or a complet list to look them up 0x0020 --> WM_SETCURSOR 0x0021 --> WM_MOUSEACTIVATE ...
[2 replies] Last: sort of just cant find a complet on but never mind making my own (by xeef)
Multiple definition of static variable
 
How can I use static variable? Everytime I compile I get an error: multiple definition. If I use one file for everything it works. But when I seperate it int...
[7 replies] Last: Yes.... having it in apple.h would have the redefined error for the re... (by Disch)
by alsade
help with text file
 
lets say i have the folowing content in a text file: Teams: New-York Knicks Washington Wizards Chicago Bulls Utah Jazz ; > Game 1, Oct. 20, 2013 New-York Knick...
[2 replies] Last: thx...not tryin to be rude but can i see an example or have some guide... (by alsade)
pointers & array
 
Hey guys , is there a difference between number 1 and number 2 ? int array ; int *ptr=array; // the above is number 1 // here is number 2 int a...
[3 replies] Last: The first ptr is a pointer to a single integer, which is initialized... (by Cubbi)
txt not being compleated
 
Well I am trying to make a program that save the user's input into a txt file but for some reason when I open the txt file the whole word is not there. #inc...
[7 replies] Last: Alright thanks you know is there a way to have the program check every... (by ProgramMaster)
by Mishu
question on gets()
 
In the following program if i reverse the order of the two i/o statements,that is,if i enter the number of elements first and after that the string..the command...
[5 replies] Last: got it..tnx alot (by Mishu)
New function
 
Pointers and local variables are stored on the stack. Global variables are declared on the heap. I got that, understood. Use of * and & are understood as much...
[3 replies] Last: Use local variables on the stack when the lifetime of the variable can... (by MikeyBoy)
Can't firgure out how to validate the input correctly.
 
I'm trying to write a code for the good ol' geometry calculator problem. I got most of it figured out (I think) but I cant get it to validate it correctly. Any ...
[10 replies] Last: No worries dude :) (by mutexe)
Removing spaces from strings
 
Hey. So I'm trying to get a string from the user and then return the number of characters in it to the user. Then i want to use a separate function to return th...
[1 reply] : In your removeSpaces function you declare an array (illegally, I mi... (by cire)
Extracting only first name from string
 
My input file is suppose to look like this Fahman, Ray Alph . Last name, First name optional middle name is how the input should be like. I have already made...
[1 reply] : You could use a stringstream #include <iostream> #include <sstream> #... (by Yanson)
by jwilt
infinite loop switch statement
 
I enter a "2" to select area of a rectangle and then input two valid numbers but after I hit enter it asks the question again instead of exiting the switch stat...
[3 replies] Last: wow, my bracket was in the wrong place (by jwilt)
by PRW56
Why are included files passed down
 
This is a very basic thing that I am just wondering about. When I #inlcude "string.h" in my header file for a class, why can I also use strings in my .cpp file ...
[6 replies] Last: There is nothing like include in Java. import in Java is like usi... (by Mathhead200)
Is an iterator a type?
 
I wondered if an interator was a type? Or is it a function? Thanks you
[8 replies] Last: I wondered if an interator was a type? Or is it a function? An iterat... (by kbw)
domain_error problem
 
Hello, I am compiling this code and I get this funny note under compilation progress: Error occurred while restoring NuGet packages: System.ArgumentException...
[1 reply] : The exception is being thrown but never caught. int main() { try { ... (by Mathhead200)
by Rahmat
how to create a sort function ???
 
I want to sort information of some cars according to their ( ID ) but i can not create a function that do this work( sort ) for me ! can you help me to sol...
[4 replies] Last: thank you (by Rahmat)
console game help!!!
 
hello i am trying to create a simple console game in c++ that moves the player up down left right when the keys are pressed i am using windows 7 64 bit with d...
[17 replies] Last: I have a couple nitpicks. How many SF sfobj s does this program need?... (by kevinkjt2000)
Need info about invisible encounter areas
 
Hi A few games I've played have invisible encounter areas until the player's sprite moves into the area. Encounter area squares then become visible around h...
[6 replies] Last: Hi Disch Thank you very much for all of that. I'm putting that into ... (by OldFangle)
Multiple program instance prevention in C
 
Hello Everyone, I am working on eliminating program instability from existing programs we have developed at work. However, due to some of the constraints ...
[6 replies] Last: I tried the above code, with the USB device connected. Still, the firs... (by CplusplusAcolyte)
January 2014 Pages: 1... 3132333435... 44
  Archived months: [dec2013] [feb2014]

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