Beginners - May 2010 (Page 25)

Array Shifting + Deleting + counting
 
I am trying to get another array to work tonight. It is similar to my last issue, which is where it needs to shift, and delete any extras, but now i also need t...
[no replies]
Standard c/c++ dll to retrieve shortcut target
 
Hello all, I am in need of a dll that, if passed the shortcut/.lnk name and the Start Menu -> Programs path if needed, will return the target attribute of th...
[no replies]
Converting pointer to float.
 
I've assigned a number into character pointer: char* strNumSet = "12.33"; I want to convert pointer strNumSet into float. What is the correct wa...
[1 reply] : See here for some ways: http://www.cplusplus.com/articles/numb_to_text... (by Bazzy)
switch,case,arrays and functions being used together!
 
hello! i am a beginner in c++ programming and am having problem in using case statement and switch together with arrays being passed to functions. can you pleas...
[1 reply] : you can make the menus in functions like this: int menu1() { ... (by Tamao)
On screen graphics?
 
I'm not even sure that's what I want or that its the correct name. I'm not that experienced but I need to do this and currently don't even know how to start lo...
[2 replies] Last: You need to create an undecorated window that you can show and hide. (by Duthomhas)
EOF problems
 
I have a .txt file with a path to a file on each line. My code opens this file & loops through each file to retrieve information. Everything is fine, but it see...
[6 replies] Last: It is one of those weird things about C++. Glad to have helped. :-) (by Duthomhas)
Hello World Error
 
Hello, I'm new to C++ and am beginning to learn it by reading "Sams Teach Yourself In One Hour A Day (6th Edition)". I'm using Bloodsheds Dev-C++ as the compile...
[5 replies] Last: Yeah, those stupid "smart quotes" get people all the time. (by Duthomhas)
by VMZB
School assignment ("fibonacci numbers")
 
Hello everyone! I am taking my first c++ class and we're on our last assigns of the semester. I have to write a program which repeatedly reads an integer betwee...
[3 replies] Last: Thanks 4 the response! I tried it without the "break;" statemts in my ... (by VMZB)
Question regarding Classes, Header Files, and Pointers
 
Good Day Everyone, I am currently studying C++ in school and have come across a situation which I am unsure of how to resolve. Our teacher provided us a b...
[6 replies] Last: Non-template functions that are declared and implemented in header f... (by jsmith)
ptr to array vs. array of ptrs
 
If I understand correctly, the following is an array of pointers to int: int *nums ; How does one define a pointer to an array of ints in one line? Can ...
[6 replies] Last: uhm.. typedef int (*my_pointer) ; (by blackcoder41)
by wkwork
Getting const strings from input
 
I've got the following code (instructions are at the top) and I can't seem to work out how I would get the user input, then make than into a const char * data t...
[7 replies] Last: Sorry... my bad... fix it like guestgulkan suggests, i.e. like this: ... (by m4ster r0shi)
Write and Input on the Same Line
 
I was just wandering if I it is possible to write and input on the same line? Here is the program I would like to use it on: #include <iostream> #include <...
[8 replies] Last: Thanks, it helps a lot. (by MottMan)
Which of these is better?
 
In a class, if I have to call another method which one should I do: class myclass { void a(); void b(); }; void myclass::a(){ //SOME CODE...
[2 replies] Last: I usually do myclass::b() (by blackcoder41)
Not sure of function type, strange error
 
Hello all. I started making my own function for combat to use in a program I'm working on. The problem is, I'm not sure what type the function should be: void o...
[3 replies] Last: // This function returns x^2. int square( int x ) { int resul... (by jsmith)
by aachen
unusual constructor syntax
 
Hi All, I read a code recently and came across a constructor syntax which I can't understand. Here is the code snippet: //class ArbPulses is derived f...
[3 replies] Last: Thanks a lot for your replies.. ! (by aachen)
by xeyide
Adding onto Dynamic Memory
 
I'm playing with the idea of having the user enter ints until a -1 is entered. Every int that is entered is stored in an dynamic array. My thought process...
[2 replies] Last: For a start, this code leaks the int sized block stored in temp. ... (by kbw)
why is the output only 1 char?
 
int main() { char *Name,temp ; cout <<"Please key in the name" ; cin.getline(temp,20,'\n') ; Name = new char[strlen(temp)] ; strcpy(Name,temp) ; ...
[1 reply] : Name is a char*. *Name is a char. (It's the same as Name ). (by kbw)
weird while!
 
hello i have a problem with understanding the while in this code (which are bold) could anyone help me why they haven't any expression? int w(char c ){ ...
[2 replies] Last: thanks, i got it (by kamyarseifi)
by clio78
if else switch... why wont this program work ?
 
try running this simple program.... why wont this work ? i tried it first with if...else /*why will this program not run? what did i do wrong with the i...
[2 replies] Last: thanks (by clio78)
by qwert
how to solve std::bad_alloc?
 
Hi, Folks, I need a program to solve a PDE numerically. I first wrote a smaller program which worked very well. After extending the program I receive now ex...
[2 replies] Last: Thank you, Duoas, for the reply. I am not really aware how I am us... (by qwert)
May 2010 Pages: 1... 2324252627... 33
  Archived months: [apr2010] [jun2010]

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