Beginners - August 2013 (Page 19)

Dealing with Functions
 
I am trying declare and define the functions but I am getting error 'string' was not declared in this scope #include <iostream> /* run this program u...
[1 reply] : You didn't include the header. #include <string> edit: A... (by AbstractionAnon)
Quick question about classes
 
someone posted a link ( http://qt.developpez.com/doc/4.7/widgets-calculator/ ) to that sight about making a calculator. the question i have is about their calc...
[no replies]
int main() versus short main()?
 
In many books/tutorials I find that int main() is always used instead of short main() . Is it even possible to use short instead of int for your main...
[6 replies] Last: BTW, don't return negative numbers from main(). It attracts bad karma. (by Duthomhas)
Array Initialization
 
I am very new to the C++ language and have started learning by teaching myself using a book(C++ a beginner's guide second edition Herbert Schildt-is that a good...
[2 replies] Last: When describing an array of X arrays of Y something, people often vie... (by SoftMOUNT)
SDL make an movable Image
 
I'm trying to load an image and move it with the arrow keys on the screen. I'm sure its only a little error but I just can't find it. To be exact it just rend...
[12 replies] Last: Yep I know. Please hit me with something for my stupidity. thank you ... (by theblackdog)
Not factoring in uppercase...
 
Here is a code that I previously worked on. I couldn't get the part about ignoring or tolower conversion correct in this program when figuring out the palindrom...
[3 replies] Last: Change cout << tolower(str ,loc); to str = tolower(str ,loc); cout... (by kevinkjt2000)
Faster way of scaling-up an image before render? (SDL)
 
Hello, I have a small, simple graphics project I'm working on, and I'm using SDL. Currently, the "default" resolution is 320x240, but my default scale is '2', ...
[5 replies] Last: I haven't looked at SDL 2.0 in great detail so I can't say whether or ... (by Disch)
compute short, int, long using pow
 
This was a program I worked on early on in the semester. I was told that Unsigned max values should be ( 2 * signed max value +1). I am just trying to figure ou...
[4 replies] Last: Check out http://www.cplusplus.com/reference/climits/ This may help y... (by Stewbond)
returnning passed array from a function
 
I want to pass a 2dim array called aArray1 to a function. The function job is swapping 2 rows of array. I want to know that Is aArray1 changed too or I should...
[3 replies] Last: You can return a bool value from the function that will report whethe... (by vlad from moscow)
Extracting Numbers From A String
 
I am trying to write a parser program. In this program it will read a string similar to. #46 = IFCCARTESIANPOINT ( (0.0000000000000000000,0.000000000000000000...
[2 replies] Last: You can make a std::istringstream from a string (the number in string ... (by LB)
defining constructor outside the class
 
can we define overloaded constructor outside the class ? if yes then what would be return type in definition like return_type class_name::func_name(arguments)...
[2 replies] Last: got you thanks! (by hellcoder)
benefit of constant member functon
 
is there any benefit (in sense of running time or anything else) to declaring a member function or object as constant?
[3 replies] Last: is there any benefit (in sense of running time or anything else) to d... (by andywestken)
memory allocations
 
in this code have we allocated any memory for string? how does the pointer remember the complete string? include <iostream> using namespace std; i...
[10 replies] Last: Both the compilers are gcc-4.8.1 I did not think about the read only m... (by kevinkjt2000)
by jenaf
C Noob question: scanf("%s") leaves trash in stdin
 
sorry, I know this is kind of a standart question but: char *filename ; char filetype; printf("filname?\n"); scanf("%s",filename); printf("type? (b/k)\...
[3 replies] Last: the char * was a result of me wanting to malloc first and then decied... (by jenaf)
How to output Text with SDL2
 
Hi everyone, I wanted to know if anyone could help me out with something. I would like to output Text using SDL2 the same way I output image files using S...
[no replies]
Visual Basic
 
So today, I went to my programming class for the first day and asked the teacher what language we would be learning, and they said visual basic. I thought visu...
[3 replies] Last: You can hand write code in VBA. It is not too difficult. (by kevinkjt2000)
help!
 
"no previous prototype for function 'addition'" it doesn't stop the program from running successfully, but i just want to know what it means for future referenc...
[7 replies] Last: [quote=man] -Wmissing-prototypes (C and Objective-C only) Wa... (by ne555)
someone explain this code for me please!
 
hi, so i'm currently reading Beginning c++ through game programming, at the end of chap.4, he writes a HangMan game, now there's something really annoying me an...
[3 replies] Last: Thank you so much both of you, now i understand :-) (by Uk Marine)
Noob question
 
sorry it is a noob question i installed visual c++ 2008 but i am unable to compile hello.c program i get error hello.obj : error LNK2019: unresolved externa...
[9 replies] Last: I would also recommend mingw fow Windows users. My personal editor is... (by kevinkjt2000)
memcpy failure
 
Hello forum, I am having a segmentation fault with the following memcpy operation: const char *binaryExt = std::string(".bin").c_str(); const c...
[9 replies] Last: The bottom line is that memcpy on any complex type is not safe. Even ... (by Disch)
August 2013 Pages: 1... 1718192021... 51
  Archived months: [jul2013] [sep2013]

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