Beginners - March 2011 (Page 43)

Option 2 Loop Wrong, or Something Else?
 
This is phase three of the project I asked about yesterday: It's the skeleton of a program without the functions added--yet. Please notice that when the opt...
[3 replies] Last: Zhuge, I'm seeing your intention more clearly now: If 1 is correct ... (by khouser)
Insert into linked list
 
This is my first c++ class, and have been through java and vb classes. I have an assignment to insert items into a linked list based on dates descending. Th...
[no replies]
What is the difference?
 
As I know "q" is a string constant(?) and 'q' is a single character.Why I can't use 'q' as argument to a function such as strcmp,while I can use "q" ?...
[3 replies] Last: [quote=oldnewbie]Does the compiler put a '\0' at the end of "q" automa... (by coder777)
string: how to count characters, not chars?
 
I'm trying to count the number of characters (not chars!) within a given string. Here is the simple program: #include <iostream> #include <string> using...
[2 replies] Last: It looks like that your compiler saves the source files as UTF-8 (unde... (by coder777)
Referece in a function perimeter understanding
 
void ChargeTrack(tracks track ,GWindow &Gwin) ChargeTrack(&track ,Gwin); tracks is a struct and track is a array in the main block of code I have code an...
[no replies]
by NV121
Homework function assistance
 
I am new to C++ and am taking the course online. Can somebody help me revise my work so I can resubmit it. Instructor Comment: What is the point of creati...
[3 replies] Last: Ok thanks guys I am new at this and trying to teach myself the languag... (by NV121)
This online class is not for me
 
out of time
[7 replies] Last: Well, that is the exact fix for a "variable being used without being i... (by Albatross)
Can I have an array in a class?
 
Can I have an array in a class? If so, what would this look like? I am not very good with classes so any explinations as to why certain things are done would be...
[6 replies] Last: It could if you like, though you'll have no way of knowing the array's... (by Zhuge)
How can I shorten this?
 
Im pretty new at c++, i just made this program for Pythagorean theorem. It works fine and everything, but im looking for new skills to shorten this down to as m...
[2 replies] Last: Thank you! I was told using "goto" was a bad idea because it can unkno... (by SOCIALISTICmeow)
by jfiore
My output is wrong
 
Hi! I made a program to analyze a roulette strategy. It uses the strategy with a range of starting amounts (many times for each), and outputs profit to a file...
[no replies]
Three Functions, Three Specific Purposes
 
Well, I'm back to Introduction to Programming I. cplusplus.com forums were perfect, unfortunately, I found you too late. Perhaps this time I can pass the clas...
[9 replies] Last: I did the three functions using call-by-reference (&). It actually wo... (by khouser)
by nono
Binary not found when using assembly in eclipse?
 
I've never coded assembly before, but I have used C in eclipse. I've never had trouble running C. I'd just press ctrl+b to create the binary, and it would run j...
[no replies]
strange syntax
 
Does this have a meaning? *++dest++=' '; .If I use it like this compiler complains but I wonder if it has since it is compiled when I use like: *(++dest)++ ...
[2 replies] Last: Thanks. (by oldnewbie)
Background and Photo editing for C#
 
Hi guys, I am a few months into my programming and have a 2 quicky, 1) how do i edit my background? so i know there is " GraphicsDevice.Clear(Color.Black);" bu...
[2 replies] Last: I am using both C+ and C# program was hoping someone would know a litt... (by shane2011)
2nd/3rd/4th Root calculator, using loops
 
I am working on a homework assignment for a Beginning C++ course. I'm using Microsoft Visual C++ 2008 (required software for the course). I have to write a p...
[3 replies] Last: Yes, that is basically what you did. Though I've seen it done more oft... (by Zhuge)
virtual base class II
 
#include <iostream> using namespace std; class A { private: int a; public: void changea(int); void displaya (void); }; void A::changea(...
[14 replies] Last: If you use virtual inheritance, there is only one A in D. If you do... (by firedraco)
Moving processing from main to a function
 
I submitted this code for eliminating unneeded whitespace from a string and I was told that I need to remove the processing from the main to a function. I've be...
[1 reply] : Calculate the number of spaces in a separate function and return that ... (by Zhuge)
by zsukal
Array pointer passed one method to another.
 
How to write function whose can use pointer returned from another function. int* func00(){ int r = {0}; r = 3; r = 4; return r; } void func(in...
[1 reply] : You are returning a pointer to a local variable in func00() that is de... (by Zhuge)
by sowa
passing command line arguments to target while debugging
 
I'm using Code::Blocks 8.02 for Windows. I can't work out how to pass command line arguments to the target application when debugging. 1) Project->set progra...
[4 replies] Last: I tried < filename in a DOS-Box of Windows. It worked fine. The appl... (by sowa)
Casting classes
 
I know we can cast a derived class to a base class using pointers so if A is a base class and B is a derived class B *b = new B(); A *a = (A*)b; Can tha...
[2 replies] Last: If I cast from B to A, should it not just truncate till all the inform... (by navderm)
March 2011 Pages: 1... 4142434445... 52
  Archived months: [feb2011] [apr2011]

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