Beginners - January 2012 (Page 27)

Subtracting Strings ('str' not found in scope)
 
I keep running into a problem with trying to subtract strings from one another.I keep getting an error saying that: error: 'str' was not declared in this sco...
[2 replies] Last: your area should be a double, just so you know...also, hurry up! due s... (by Lurp)
by Khoi
help me fix ....
 
1/ printf( "The product of %d and %d is %d"\n, x, y ); printf( "The product of %d and %d is %d\n”, x, y ); <= I fixed but not sur...
[2 replies] Last: 2. largest = number; Remember == is relational meaning it compares. Y... (by thepedestrian)
by Khatzu
Not sure if this is an Insertion Sort or...
 
I've been struggling so understand algorithms. I tend to write my own code based on spoken instructions or visual cues rather than pseudo code, which usually le...
[3 replies] Last: jwroblewski, what you have there is not insertion sort. Also the size ... (by Peter87)
what is wrong with my code for quick sort...??
 
#include<iostream> #include<stdio.h> #define max 50 using namespace std; void qsort(int *arr,int,int); int partition(int *arr,int,int); int main() { int...
[2 replies] Last: i see you defined a max of 50 for int a in int main(), but i dont b... (by jwroblewski)
Mysterious C2228 and C2227 errors VC++
 
The intellisense keeps telling me that on the lines "MyVector.size()" "Expression must have a class type". I don't know why, the vector has been successfully pa...
[1 reply] : On line 6 you should remove the () . There is two ending brackets } ... (by Peter87)
Looping Voids Will Not Work
 
Hi. I have a program that is running using multiple void functions, but I want it to repeat. It worked perfectly before I tried to ad the loop statement, but no...
[15 replies] Last: Lovely! It works perfectly! Thank you Wisely Done, and Peter 87, for y... (by ComradeTaco)
Having trouble learning how to pass a function a parameter
 
Hi, I'm working on a project to learn how to pass one function to another one. From everything I've read it seems like I have to create a pointer to the functio...
[6 replies] Last: In that case, since you're using OOP, try using inheritance. If that's... (by closed account zb0S216C)
Program that edits many bmps by itself quickly?
 
Hello, before you read this I just want to say that I am a beginner to C++ and that I may sound a little silly in this. Also I appreciate ANY advice you can gi...
[1 reply] : Well you can approach this one of two ways. Firstly you could use any ... (by closed account o1vk4iN6)
Program worked before I used functions
 
So, I wrote my first program, and it worked fine. Go me. Then, I went back, and had to use functions, so I just turned it into 3 very simple (or so I thought)...
[5 replies] Last: Thank you for clearing that up. As for the teacher, I do have to ema... (by ErinCorona)
Reading off a string array from a text file.
 
Hello, I am attempting to read off a specific portion of a string based on the input of the user. Each time I run this program, I get an exception handling erro...
[1 reply] : Your program is crashing because you create an array of strings called... (by ModShop)
program that loads scripts
 
i want to make a kind of a game engine that loads files that are written in c++ is that possible??or is other scripting language needed??
[no replies]
error C2065: 'words' : undeclared identifier
 
Hi all, Im new to c++, which i have been programming java for 6 years now and im still getting use to the syntax of this language. Im encounter an err...
[5 replies] Last: Thanks Again, and I understand what you were getting at before, perfec... (by Accident113)
Need help to create a function to save data to a file.
 
Hi, I'm working on a mileage calculator to better understand functions and objects and need some help figuring out how to write data to a file so I can call it ...
[3 replies] Last: Thanks for your help, I've changed the first two things you pointed ou... (by Scottm4321)
generating random odd and even number is sequence
 
Hello guys, I'm in need of assistance. I appreciate any help! I want to generate random even and odd numbers is sequence pretty much like this: 1st number ...
[5 replies] Last: I've replaced the A = 37 + (2*rand()) % 30; with A = 37 + (2*ra... (by CosminNTG)
by fellow
what happend to my ide?
 
Hi! I'm a beginner in programming. I tested a simple code with pointers. Suddenly my ide (netbeans) doesn't compile other files being compiled before. ...
[4 replies] Last: Yes, I think the same. It's really strange this behaviour. I don't wor... (by CosminNTG)
string array error
 
I'm writing a program to be sort of a spanish-english dictionary of sorts and my compiler keeps saying theres some sort of an error when i try to assign values ...
[2 replies] Last: Thank you SO MUCH this problem has been bothering me since yesterday (by BoyZack)
Error in function returning pointers
 
#include<iostream> using namespace std; int* Merge(int* a,int* b,int m,int n) { int ans[m+n-1],i=0,j=0,k=0; while(i<m || j<n) { if(i>=m) {...
[4 replies] Last: And it comes with no surprise. Like I stated before, you are returnin... (by webJose)
Static and Dynamic Binding
 
Distinguish between Static and Dynamic Binding, through Examples.
[2 replies] Last: got it.. thx :) (by mrehan27)
Compiling error
 
I have VB/Powershell/Vbscript/Java experience, but have never written in C++. I have the following C++ code that I have procured from Microsoft, and I am getti...
[4 replies] Last: Allright, sorry for lateing. I am very busy nowdays. So, I've compiled... (by CosminNTG)
using pair and map
 
Dear all, I'm trying to create a map reference which should containt a pair as a key and a bool vector as the value i.e. such a thing map<pair<int,int>...
[10 replies] Last: I solved the issue indeed as Peter87 suggested by limiting the Pointer... (by eothein)
January 2012 Pages: 1... 2526272829... 48
  Archived months: [dec2011] [feb2012]

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