Beginners - January 2010 (Page 12)

by ripley
strlen and sizeof (1,2)
 
Hello, why is this: unsigned char *temp = NULL; temp = new unsigned char ; std::cout<< "size " << strlen((char*)temp); giving a size 32 and...
[29 replies] Last: If you want to represent strings this way you'll probably need to wri... (by ripley)
URGENT!: confused about what to do for this class
 
ok, i have written a class Sequence, which has an array that holds unsigned longs. now i have to write another class ScoreList that records a sequence of unsig...
[1 reply] : class ScoreList { Sequence scores; }; (by jsmith)
URGENT FILE(i dont understand)
 
can any1 help me change the program so that i can save the values a, b, c, the roots to a file? PLZ rep ASAP #include <stdio.h> #include <math.h> #inclu...
[1 reply] : 1. Indent your code consistently. 2. Try typing more coherently and p... (by chrisname)
Pointers & Arrays
 
i am a total beginner.. plz help with question.... 5. Write a short program to sort an array of numbers a. Create an integer array of 10 numbers b. Preload t...
[1 reply] : Clearly this is a homework question. Show the effort you've made to an... (by chrisname)
Problem with GetAsyncKeyState
 
bool IsKeyPressed(int iKey) { //here is the IsKeyPressed Function return ((GetAsyncKeyState(iKey) & 1) == 1); } if(IsKeyPressed(VK_RETURN)==tru...
[4 replies] Last: ((GetKeyState(VK_RETURN)==true) & 1) ? (by kbw)
problems with a string array, assistance please!
 
I'm pretty new to C++ (have done about 2 months on my course), and I've been trying to get this so that region will update itself through each loop cycle, but a...
[3 replies] Last: Thanks for the replies, sorted now (by Major8201)
by rey
C++ Microcontroller
 
Hi Guys, Need your kind expert advice. I have to come out with a programme in C++ but I have no idea how to make it, really hope that anyone of you here can ...
[15 replies] Last: its just an emulation bro...any idea how to come out with the prompt t... (by rey)
Confusing IO problem.
 
Hi everyone, I'm an absolute newbie in C++, please help me to solve this problem. This problem is something related to the getline method. I write a program t...
[6 replies] Last: The extraction operator, >>, skips the newline character and unless th... (by yoked88)
by boon
Made my own header, problems..
 
Okay so I am making a program using a custom #define file that I have constructed. The define file contains a bunch of questions in the form of: #define ...
[1 reply] : I know the define function can be a pain to work with because C treat... (by helios)
Arrays and parameters
 
To find and return the largest index: int largestIndex(const int list , int size) { int index; int max = 0; for(index = 1; index < size;...
[7 replies] Last: Thank you everyone. For some reason, trying to learn how to manipulat... (by yoked88)
by eruina
Confusion about classes and program design
 
I read that classes something like custom "data types" in a sense with their own functions. Examples that I've read usually revolve around an obvious object...
[3 replies] Last: I'm doing this for homework, haha. Thanks for the replies. It helped c... (by eruina)
by JSpiff
Builds right but crashes instantly
 
I currently trying to make a word jumbler with a betting game within. I typed in the word jumbler part and then added the play loop and finally the betting part...
[2 replies] Last: so you are saying that This: string guess; int money = 50; in... (by JSpiff)
Structure Confusion
 
I'm starting structures, and this program I'm doing is making me confused on how to pass information or even store information on to the object of a structure. ...
[3 replies] Last: It works! Thank you so much, never thought of that...yet it was so sim... (by Ryan15000)
done with program now what?
 
im done with the program, now what? how do i turn it into a .exe or something similar so i can distribute? thanks in advance
[14 replies] Last: I've made the .exe that's not hard. all you do is compile it to make s... (by Darth Bane)
adding to an array (1,2)
 
hi to all, i have a question. I have the following code to enter a string into an array, char str_in ; char str_out ; strcpy (str_in, th...
[21 replies] Last: Here's my solution, which needs a little polishing in find_word_bounda... (by jsmith)
Cout statement problem
 
Hello, I am new to programming and there is a problem I cannot figure out. Write a cout statement so the variable divSales is displayed in a filed of eight s...
[2 replies] Last: Thanks for the link (by Bearcats09)
Reading from binary files
 
hello everyone.I have written this piece of code in order to practise myself in files. I have come up a weird problem though and i would like your help.In th...
[14 replies] Last: Sorry -- that was a mistake. Line 13 (line 4 in your most recent post... (by PanGalactic)
RtMIDI library causes undifined reference error
 
I have some experience in VB.net and python, but decided to switch to C++. So I know something about programming, but am still a noob in c++. I'm trying to use...
[4 replies] Last: I fixed it, I switched IDE on the way though. I now work in Qt Creator... (by jonasbalmer)
Question about 'new'...
 
I know that if I use "new" to allocate space within an object, then I am supposed to de-allocate the space in the destructor with "delete". How do you handle th...
[13 replies] Last: I assume that I have to track which objects are created on the heap a... (by helios)
Struggling with classes
 
hello everyone, i am really new to C++ and trying to learn the basics of creating a class. I have several books on C++ and have read each chapter on classes....
[1 reply] : I think it would be better if you posted your failures, since then I c... (by hamsterman)
January 2010 Pages: 1... 1011121314... 24
  Archived months: [dec2009] [feb2010]

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